I did not see a proper place to post about zend_form so I will do so here.
I've taken a queue from the zend framework site's quickstart and created a form for a simple login. However I did so in a slightly different way, I dont see how my way could have caused an error.
The error is more a notice (as it states) but why should I receive a notice while the quickstart version does not?
Notice:
Code:
Notice: Array to string conversion in /home1/ioforgec/zendev/library/Zend/View/Helper/FormElement.php on line 55
Code:
$submit = array('submit', array('label' => 'Log In'));
$struct = array('uname' => array('text', array('required' => true, 'label' => 'Username')),
'pword' => array('password', array('required' => true, 'label' => 'Password')));
$config = array('method' => 'post', 'elements' => $struct, 'submit' => $submit, 'action' => '/index/login');
$form = new Zend_Form(array('method' => 'post', 'elements' => $struct, 'submit' => $submit, 'action' => '/index/login'));
//$form = new Zend_Form($config);
return $form;
This is the one from the quick start, I dont see how this one is much different:
Code:
$form = new Zend_Form(array(
'method' => 'post',
'elements' => array(
'comments' => array('textarea', array(
'required' => true,
'label' => 'Write your comments'
)),
'submit' => array('submit', array(
'label' => 'Add Comment'
))
),
));