Skip to content

Commit

Permalink
changing the path that radio buttons use, fixes #21
Browse files Browse the repository at this point in the history
  • Loading branch information
zeelot committed Aug 12, 2010
1 parent e22214e commit b401f69
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions classes/yuriko/yform/field/radio.php
Expand Up @@ -13,6 +13,9 @@ public function __construct($name, $value)
{
parent::__construct($name);

// The path is a little different for radio buttons
$this->_path = preg_replace('#\[([^\[\]]++)\]#', '.\1', $name.'.'.$value);

$this->set_attribute('type', 'radio')
->set_attribute('value', $value)
->set_attribute('id', $this->get_attribute('id').'_'.$value);
Expand Down

0 comments on commit b401f69

Please sign in to comment.