Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

zendframework/zf2@90e4176 (1394225922)

  • Loading branch information...
commit 6de0990c866d134311df4fbcb4d6e2bbea1713f9 1 parent c04843a
@weierophinney weierophinney authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 View/Helper/FormRow.php
View
5 View/Helper/FormRow.php
@@ -160,7 +160,9 @@ public function render(ElementInterface $element)
$elementString = $elementHelper->render($element);
- if (isset($label) && '' !== $label) {
+ // hidden elements do not need a <label> -https://github.com/zendframework/zf2/issues/5607
+ $type = $element->getAttribute('type');
+ if (isset($label) && '' !== $label && $type !== 'hidden') {
$labelAttributes = array();
@@ -178,7 +180,6 @@ public function render(ElementInterface $element)
// Multicheckbox elements have to be handled differently as the HTML standard does not allow nested
// labels. The semantic way is to group them inside a fieldset
- $type = $element->getAttribute('type');
if ($type === 'multi_checkbox'
|| $type === 'radio'
|| $element instanceof MonthSelect
Please sign in to comment.
Something went wrong with that request. Please try again.