Permalink
Browse files

changing the path that radio buttons use, fixes #21

  • Loading branch information...
1 parent e22214e commit b401f69c80cf6b24f15fe6b9e0715cbf87c2fae3 @Zeelot committed Aug 12, 2010
Showing with 3 additions and 0 deletions.
  1. +3 −0 classes/yuriko/yform/field/radio.php
@@ -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);

0 comments on commit b401f69

Please sign in to comment.