Example #1
0
$attribute = array('class' => $isBoostrap ? 'form-horizontal' : '', 'action' => 'index.php', 'id' => 'name');
echo Boostrap::openForm("Create a new form", $attribute);
echo str_replace('{text}', 'Form Name', Element::text(array('label' => 'Form Name', 'placeholder' => '', 'help' => ''), 'textinput', false));
echo Element::button("New");
echo Boostrap::closeForm();
//////////////////////////////
// open form
$attribute = array('class' => $isBoostrap ? 'form-horizontal' : '', 'action' => 'index.php');
echo Boostrap::openForm("Add elements to form", $attribute);
// open form
// make the form body here
/////////////////////////////////////////////////
echo str_replace('{button}', ' ', Element::text(array('label' => "Question Name", 'placeholder' => "Type name tag", 'help' => "Type name tag here")));
$label = array();
$count = '';
$result = $db->getAllElements();
while ($row = $result->fetch_assoc()) {
    $label[$row['id']] = $row['label'];
    //                array_push($label,$row["id"],$row["label"]);
}
//die(print_r($label));
echo Element::dropdownList("select elements", $label);
echo str_replace('{button}', ' ', Element::text(array('label' => "If you are selecting, RadioButton, CheckBox or Dropdown list please give options as comma seperated list", 'placeholder' => "Type name tag", 'help' => "Type name tag here"), 'list'));
echo Element::button("Add element to form");
////////////////////////////////////////
Boostrap::closeForm();
// end form
Boostrap::closeDiv();
//column end
Boostrap::closeDiv();
// row end