Issues

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

Issue Type: Bug Created: 2008-02-28T00:18:16.000+0000 Last Updated: 2008-03-21T16:25:29.000+0000 Status: Resolved Fix version(s): - 1.5.0 (17/Mar/08)

Reporter: Arthur Kang (arthurkang) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Form

Related issues: Attachments:

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.

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

Works. Form action is set in HTML.

<pre class="highlight">
$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}

<pre class="highlight">
$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

Posted by Matthew Weier O'Phinney (matthew) on 2008-03-05T10:30:17.000+0000

Scheduling for 1.5.0GA release.

Posted by Matthew Weier O'Phinney (matthew) on 2008-03-06T14:13:05.000+0000

Resolved in trunk and merged to release-1.5 branch

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts