Skip to content
Permalink
Browse files

Fix so that the input isn't rendered twice when using `nestedInput` =…

…> true
  • Loading branch information...
lilHermit committed Jan 24, 2017
1 parent fcadcc5 commit 446add8042758f00ee8ba1ba73f25551d24f8ae7
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/View/Helper/FormHelper.php
@@ -1059,7 +1059,11 @@ public function input($fieldName, array $options = [])
}
$label = $this->_getLabel($fieldName, compact('input', 'label', 'error', 'nestedInput') + $options);
$result = $this->_groupTemplate(compact('input', 'label', 'error', 'options'));
if ($nestedInput) {
$result = $this->_groupTemplate(compact('label', 'error', 'options'));
} else {
$result = $this->_groupTemplate(compact('input', 'label', 'error', 'options'));
}
$result = $this->_inputContainerTemplate([
'content' => $result,
'error' => $error,
@@ -1088,7 +1092,7 @@ protected function _groupTemplate($options)
}
return $this->formatTemplate($groupTemplate, [
'input' => $options['input'],
'input' => isset($options['input']) ? $options['input'] : [],
'label' => $options['label'],
'error' => $options['error'],
'templateVars' => isset($options['options']['templateVars']) ? $options['options']['templateVars'] : []

0 comments on commit 446add8

Please sign in to comment.
You can’t perform that action at this time.