Text Field Samples Source Code
$textFieldForm = new FormGenerator();
$textFieldForm->addText("Minimal text field", "text-minimal");
$textFieldForm->addText("Text field with initial value", "text-initial", "Text Field Value");
$textFieldForm->addText("Text field with placeholder", "text-placeholder", "", "This is placeholder");
$textFieldForm->addText("Text field with description", "text-description", "", "", "This is description");
$textFieldForm->addText("Disabled text field", "text-disabled", "Some Value", "This is placeholder", "", true);
$textFieldForm->makeForm("Text Fields Demo Form", "?", $textFieldForm->getInputFields(), "", "Submit", "", "POST", "multipart/form-data");
          

Text Fields Demo Form

This is description
Password Field Samples Source Code
  $passwordFieldForm = new FormGenerator();
  $passwordFieldForm->addPassword("Minimal password", "password-minimal");
  $passwordFieldForm->addPassword("Password with initial value", "password-initial", "initialValue");
  $passwordFieldForm->addPassword("Password with placeholder", "password-placeholder", "", "Password Placeholder");
  $passwordFieldForm->addPAssword("Password with description", "password-description", "", "", "This is password description");
  $passwordFieldForm->addPassword("Disabled password field", "password-disabled", "initialPasswordValue", "", "", true);
  $passwordFieldForm->makeForm("Password Fields Demo Form", "?", $passwordFieldForm->getInputFields(), "Password Form Description", "Submit Password", "", "POST", "multipart/form-data");
          

Password Fields Demo Form

Password Form Description

This is password description
File Field Samples Source Code
$fileFieldForm = new FormGenerator();
$fileFieldForm->addFile("File Minimal", "file-minimal");
$fileFieldForm->addFile("File With Description", "file-description", "Description");
$fileFieldForm->addFile("File Disabled", "file-disabled", "", true);
$fileFieldForm->makeForm("File Fields Demo Form", "?", $fileFieldForm->getInputFields(), "File Form Description", "Submit File", "", "POST", "multipart/form-data");
              

File Fields Demo Form

File Form Description

Description
Textarea Samples Source Code
$textareaForm = new FormGenerator();
$textareaForm->addTextarea("Textarea Minimal", "textarea-minimal");
$textareaForm->addTextarea("Textarea With Initial Value", "textarea-initial-value", "Hello Textarea");
$textareaForm->addTextarea("Textarea With Placeholder", "textarea-placeholder", "", "This is textarea placeholder");
$textareaForm->addTextarea("Textarea With Description", "textarea-description", "", "", "Textarea Description");
$textareaForm->addTextarea("Textarea disabled", "textarea-disabled", "", "", "", true);
$textareaForm->makeForm("Textarea Demo Form", "?", $textareaForm->getInputFields(), "File Form Description", "Submit File", "", "POST", "multipart/form-data");
            

Textarea Demo Form

File Form Description

Textarea Description
Select Field Samples Source Code
$selectFieldForm = new FormGenerator();
$selectFieldForm->addSelect("Select Minimal", "select-minimal", $cities);
$selectFieldForm->addSelect("Select With Selected Item", "select-selecteditem", $cities, array(1));
$selectFieldForm->addSelect("Select With Description", "select-description", $cities, array(), "This is Select Description");
$selectFieldForm->addSelect("Select Disabled", "select-disabled", $cities, array(2), "", true);
$selectFieldForm->addSelect("Select Multiple Selection", "select-multiselect", $cities, array(2, 4), "", false, true);
$selectFieldForm->addSelect("Select Without 'Please Select' Option", "select-pleaseSelect", $cities, array(), "", false, false, false);
$selectFieldForm->makeForm("Select Demo Form", "?", $selectFieldForm->getInputFields(), "Select Demo Form Description", "Submit Select", "", "POST", "multipart/form-data");
            

Select Demo Form

Select Demo Form Description

This is Select Description
Radio Samples Source Code
$radioForm = new FormGenerator();
$radioForm->addRadio("Radio minimal", "radio-minimal", $cities);
$radioForm->addRadio("Radio With Selection", "radio-selected", $cities, 4);
$radioForm->addRadio("Radio With Description", "radio-description", $cities, 3, "Radio description");
$radioForm->addRadio("Radio disabled", "radio-disabled", $cities, 2, "", true);
$radioForm->makeForm("Radio Demo Form", "?", $radioForm->getInputFields(), "Radio Demo Form Description", "Submit Radio", "", "POST", "multipart/form-data");
            

Radio Demo Form

Radio Demo Form Description

Radio description
Checkbox Samples Source Code
$checkBoxForm = new FormGenerator();
$checkBoxForm->addCheckbox("Checkbox minimal", "checkbox-minimal", $cities);
$checkBoxForm->addCheckbox("Checkbox With Selection", "checkbox-selected", $cities, array(2,4));
$checkBoxForm->addCheckbox("Checkbox With Description", "checkbox-description", $cities, array(3,4), "Checkbox description");
$checkBoxForm->addCheckbox("Checkbox Disabled", "checkbox-disabledl", $cities, array(2), "", true);
$checkBoxForm->makeForm("Checkbox Demo Form", "?", $checkBoxForm->getInputFields(), "Checkbox Demo Form Description", "Submit Radio", "", "POST", "multipart/form-data");
            

Checkbox Demo Form

Checkbox Demo Form Description

Checkbox description