ZF-2747: Zend_Form: Using attribs Causes action Key Not to Be Set

Description

Using 'attribs' for the form blows the action key. To get the form to generate properly, you have to move the action into the attribs array.


$form = new Zend_Form(array(
    'action' => '/user/test',
    'method' => 'post',
    'elements' => array(
        'username' => 'text'
    )
));

Works. Form action is set in HTML.


$form = new Zend_Form(array(
    'action' => '/user/test',
    'method' => 'post',
    'attribs' => array('id'=>'testid', 'class'=>'testclass'),
    'elements' => array(
        'username' => 'text'
    )
));

{color:red}Doesn't Work. Form action is not set in HTML.{color}


$form = new Zend_Form(array(
    'method' => 'post',
    'attribs' => array('action'=>'/user/test', 'id'=>'testid', 'class'=>
    'testclass'),
    'elements' => array(
        'username' => 'text'
    )
));

Works. Form action is set in HTML.

Comments

Scheduling for 1.5.0GA release.

Resolved in trunk and merged to release-1.5 branch