Skip to content

Commit

Permalink
Add hiddenblock to the default templates and use it.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Feb 11, 2014
1 parent 216a2b4 commit 75afc67
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/View/Helper/FormHelper.php
Expand Up @@ -162,6 +162,7 @@ class FormHelper extends Helper {
protected $_defaultTemplates = [
'formstart' => '<form{{attrs}}>',
'formend' => '</form>',
'hiddenblock' => '<div style="display:none;">{{content}}</div>',
];

/**
Expand Down Expand Up @@ -368,9 +369,9 @@ public function create($model = null, $options = []) {
}

if (!empty($append)) {
$append = $this->Html->useTag('hiddenblock', $append);
$append = $this->formatTemplate('hiddenblock', ['content' => $append]);
}
return $this->_templater->format('formstart', [
return $this->formatTemplate('formstart', [
'attrs' => $this->_templater->formatAttributes($htmlAttributes)
]) . $append;
}
Expand Down

0 comments on commit 75afc67

Please sign in to comment.