form('start'); $this->form('set', 'class', 'Savant-Form'); // add a hidden value before the layout $this->form('hidden', 'hideme', 'hidden & valued'); // NEW BLOCK $this->form('block', 'start', "First Section", 'row'); // text field $this->form('text', 'mytext', $this->mytext, 'Enter some text here:', null); // messages for the text field $this->form('note', null, null, $this->valid['mytext'], array('required' => 'This field is required.', 'maxlen' => 'No more than 5 letters.', 'no_digits' => 'No digits allowed.')); $this->form('block', 'split'); // checkbox with default value (array(checked, not-checked)) $this->form('checkbox', 'xbox', $this->xbox, 'Check this:', array(1,0), 'style="text-align: center;"'); // single select $this->form('select', 'picker', $this->picker, 'Pick one:', $this->opts); // END THE BLOCK and put in some custom stuff. $this->form('block', 'end'); ?>

Custom HTML Between Fieldset Blocks

form('block', 'start', "Second Section", 'col'); // multi-select with note $this->form('group', 'start', 'Pick many:'); $this->form('select', 'picker2[]', $this->picker2, 'Pick many:', $this->opts, 'multiple="multiple"'); $this->form('note', "
Pick as many as you like; use the Ctrl key on Windows, or the Cmd key on Macintosh."); $this->form('group', 'end'); // radio buttons $this->form('radio', 'chooser', $this->chooser, 'Choose one:', $this->opts); // NEW BLOCK $this->form('block', 'start', null, 'row'); // text area $this->form('textarea', 'myarea', $this->myarea, 'Long text:', array('rows'=>12,'cols'=>40)); // NEW BLOCK (clears floats) $this->form('block', 'start', null, 'row', null, 'both'); $this->form('submit', 'op', 'Save'); $this->form('reset', 'op', 'Reset'); $this->form('button', '', 'Click Me!', null, array('onClick' => 'return alert("hello!")')); // end the form $this->form('end'); ?>