Skip to content
This repository
Browse code

changing the path that radio buttons use, fixes #21

  • Loading branch information...
commit b401f69c80cf6b24f15fe6b9e0715cbf87c2fae3 1 parent e22214e
Lorenzo Pisani authored

Showing 1 changed file with 3 additions and 0 deletions. Show diff stats Hide diff stats

  1. +3 0  classes/yuriko/yform/field/radio.php
3  classes/yuriko/yform/field/radio.php
@@ -13,6 +13,9 @@ public function __construct($name, $value)
13 13 {
14 14 parent::__construct($name);
15 15
  16 + // The path is a little different for radio buttons
  17 + $this->_path = preg_replace('#\[([^\[\]]++)\]#', '.\1', $name.'.'.$value);
  18 +
16 19 $this->set_attribute('type', 'radio')
17 20 ->set_attribute('value', $value)
18 21 ->set_attribute('id', $this->get_attribute('id').'_'.$value);

0 comments on commit b401f69

Please sign in to comment.
Something went wrong with that request. Please try again.