newhck / php-form-builder-class

Automatically exported from code.google.com/p/php-form-builder-class
GNU General Public License v3.0
0 stars 0 forks source link

Grouping of fields in form, with line/title #48

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add Fields To Form
2. Use Map Variable to perform layout
3. Layout still not easy to distinguish

What is the expected output? What do you see instead?
Should be able to add fields in a specific group with title. By example for
a registration form, a group for address fields, a group for contact person
information, ... It then should be parsed like this (by example) TITLE,
underline, fields.

What version of the product are you using? On what operating system?
latest

Please provide any additional information below.

Original issue reported on code.google.com by uwictpar...@gmail.com on 1 Jun 2010 at 6:59

GoogleCodeExporter commented 8 years ago
The addHTML() function can be used to add custom markup into your form's 
content.  Below is example code that could be used to add underlined group 
headers to your form.

$form = new form("my_example");
$form->setAttributes(array(
   "width" => 400
));
$form->addHTML('<div style="border-bottom: 1px solid #000; padding-bottom: 2px; 
margin-bottom: 10px; font-size: 18px;">Header #1</div>');
$form->addTextbox("Textbox #1:", "Textbox1");
$form->addTextbox("Textbox #2:", "Textbox2");
$form->addTextbox("Textbox #3:", "Textbox3");
$form->addHTML('<div style="border-bottom: 1px solid #000; padding-bottom: 2px; 
margin: 20px 0 10px 0; font-size: 18px;">Header #2</div>');
$form->addTextbox("Textbox #4:", "Textbox4");
$form->addTextbox("Textbox #5:", "Textbox5");
$form->addTextbox("Textbox #6:", "Textbox6");
$form->addButton();
$form->render();

Original comment by ajporterfield@gmail.com on 1 Jun 2010 at 6:55