Issues

ZF-3206: Using placement in Zend_View_Helper_FormRadio breaks setting of value

Issue Type: Bug Created: 2008-05-06T07:39:19.000+0000 Last Updated: 2008-07-22T12:46:01.000+0000 Status: Resolved Fix version(s): - 1.5.3 (28/Jul/08)

Reporter: malt (malt) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_View

Related issues: Attachments:

Description

When i set a placement for the formRadio Helper, the given value used for setting the checked attribute is overridden. This happens in the formRadion function while the label attributes are processed:

<pre class="highlight">
case 'placement':
  unset($label_attribs[$key]);
  $value = strtolower($val); <- $value is a function parameter and used for checked attribute
  if (in_array($val, array('prepend', 'append'))) {
      $labelPlacement = $val;
  }
  break;

This should be like this i think:

<pre class="highlight">
case 'placement':
  unset($label_attribs[$key]);
  $val = strtolower($val);
  if (in_array($val, array('prepend', 'append'))) {
      $labelPlacement = $val;
  }
  break;

Comments

Posted by Matthew Weier O'Phinney (matthew) on 2008-05-09T12:07:21.000+0000

Scheduling for next mini release.

Posted by Alex Peterson (alx) on 2008-07-18T16:35:08.000+0000

oh man, finding this bug took me forever - and i arrived at the same conclusion as the poster.

Posted by Matthew Weier O'Phinney (matthew) on 2008-07-22T12:46:00.000+0000

Fixed in trunk and 1.5 and 1.6 release branches.

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