Open-Source PHP Framework - Designed for rapid development of performance-oriented scalable applications

Form Tools

All examples on this page must be utilized within a form- start with echo $form->getFormOpen(); and end with echo $form->getFormClose();

Basic text input

echo $form->getInput(array('name' => 'city'));

Date selector

echo $form->getDateSelect(array('name' => 'birthday'));

Advanced date/time selector

echo $form->getDateSelect(array('name' => 'schedule',
                                'year' => array(2009, 2012),
                                'minute' => array('increment' => 10),
                                'value' => array('month' => 5, 'day' => 18, 'year' => 2010,
                                                 'hour' => 7, 'minute' => 50, 'ampm' => 'pm')));

Rich-text WYSIWYG textarea (generates valid-XHTML 1.1 markup)

$args = array('name' => 'richtext', 'label' => 'WYSIWYG text input', 'value' => 'Try out...',
              'type' => 'textarea', 'wysiwyg' => true);
echo $form->getInput($args);

HTML-entry box with live preview

echo $form->getInput(array('name' => 'html_entry', 'label' => 'HTML-entry', 'type' => 'textarea', 'preview' => true,
                           'value' => 'Enter <strong>HTML</strong> here...'));

Automatic state-maintenance: forms built using these helpers retain entered-data after form submission

Try typing into any of the boxes above or changing the date-selectors and then submitting the form:

echo $form->getInput(array('type' => 'submit'))

Your changes entered above will remain intact after the page reloads.

And there are many more form helpers...

View the full list in the API