Skip to content

Commit

Permalink
[Form] fixed radio and checkbox when data is not bool
Browse files Browse the repository at this point in the history
  • Loading branch information
kriswallsmith committed Nov 16, 2011
1 parent a229cc0 commit 940f970
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Extension/Core/Type/CheckboxType.php
Expand Up @@ -37,7 +37,7 @@ public function buildView(FormView $view, FormInterface $form)
{
$view
->set('value', $form->getAttribute('value'))
->set('checked', (Boolean) $form->getData())
->set('checked', (Boolean) $form->getClientData())
;
}

Expand Down
2 changes: 1 addition & 1 deletion Extension/Core/Type/RadioType.php
Expand Up @@ -37,7 +37,7 @@ public function buildView(FormView $view, FormInterface $form)
{
$view
->set('value', $form->getAttribute('value'))
->set('checked', (Boolean) $form->getData())
->set('checked', (Boolean) $form->getClientData())
;

if ($view->hasParent()) {
Expand Down

0 comments on commit 940f970

Please sign in to comment.