Permalink
Browse files

Fixing Radio buttons not checking if bound to subdocument

  • Loading branch information...
1 parent 96bb832 commit 2a71086a0b6379826bff87395f3b83eea0eb1cfa @giacmir giacmir committed Oct 24, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 template/helper/Form.php
View
5 template/helper/Form.php
@@ -670,11 +670,12 @@ public function radio($name, array $options = array()) {
$defaults = array('value' => '1');
$options += $defaults;
$default = $options['value'];
+ $key = $name;
list($name, $options, $template) = $this->_defaults(__FUNCTION__, $name, $options);
list($scope, $options) = $this->_options($defaults, $options);
- if (!isset($options['checked']) && ($bound = $this->binding($name)->data)) {
+ if (!isset($options['checked']) && ($bound = $this->binding($key)->data)) {
$options['checked'] = ($bound == $default);
}
@@ -857,4 +858,4 @@ protected function _generators($method, $name, $options) {
}
}
-?>
+?>

0 comments on commit 2a71086

Please sign in to comment.