Zend Framework

Zend_Form: Using attribs Causes action Key Not to Be Set

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Trivial Trivial
  • Resolution: Fixed
  • Affects Version/s: 1.5.0RC1
  • Fix Version/s: 1.5.0
  • Component/s: Zend_Form
  • Labels:
    None
  • Fix Version Priority:
    Must Have

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'
    )
));

Doesn't Work. Form action is not set in HTML.

$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.

Activity

Hide
Matthew Weier O'Phinney added a comment -

Scheduling for 1.5.0GA release.

Show
Matthew Weier O'Phinney added a comment - Scheduling for 1.5.0GA release.
Hide
Matthew Weier O'Phinney added a comment -

Resolved in trunk and merged to release-1.5 branch

Show
Matthew Weier O'Phinney added a comment - Resolved in trunk and merged to release-1.5 branch

People

Vote (0)
Watch (0)

Dates

  • Due:
    Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
15m
Original Estimate - 15 minutes
Remaining:
15m
Remaining Estimate - 15 minutes
Logged:
Not Specified
Time Spent - Not Specified