I have a test form made using Zend like this
$form = new Zend_Form();
$form->setAction($_SERVER['PHP_SELF'])
->setMethod('post');
// Create and configure username element:
$username = $form->createElement('text', 'username');
$username->addValidator('alnum')
->addValidator('regex', false, array('/^[a-z]+/'))
->addValidator('stringLength', false, array(6, 20))
->setRequired(true)
->addFilter('StringToLower');
// Add elements to form:
$form->addElement($username)
->addElement($password)
// use addElement() as a factory to create 'Login' button:
->addElement('submit', 'login', array('label' => 'Login'));
What I need is to make some custom element that really is just a DIV with an ID and title (because I am making a field with JS that converts the DIV to proper inputs).
I have looked online for a way to create custom form elements but keep running into custom form error messages.
One possible solution is here:
http://www.nabble.com/Zend_Form-Custom-Elements-and-Input-type-file-td15620129.html
But it does not explain what goes in the test.php file to make it work - leaving me confused. If anyone has a helpful article on hand even, that would be great.