Permalink
Browse files

rendering element type='hidden' fix closes #61

  • Loading branch information...
1 parent c1ea8cd commit 227047ab57ffd773a7b5710c84f04c7f43ca6075 Antonio Ramirez committed Oct 26, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 widgets/TbForm.php
View
@@ -155,8 +155,10 @@ public function renderElement($element)
{
if ($element instanceof TbFormInputElement)
{
- if ($element->type !== 'hidden') //use default from parent for 'hidden' elements
- return $element->render();
+ if ($element->type === 'hidden')
+ return "<div style=\"display:none\">\n".$element->renderInput()."</div>\n";
+ else
+ return $element->render();
}
return parent::renderElement($element);

0 comments on commit 227047a

Please sign in to comment.