Closed ker0x closed 10 years ago
Thank you. It is typo ...
I wasn't referring to the typo. I thought the plugin had a bug that doubled the name of the model in the "for" attribute of the "label" when an "input" was of type "radio".
In fact it's the FormHelper itself that generates the problem. I've solved this by adding some code to the end of the FormHelper in the plugin.
public function label($fieldName = null, $text = null, $options = array()) {
if ($this->_inputType === 'radio') {
$regex = '/' . current($this->entity()) . '/';
$fieldName = preg_replace($regex, '', $fieldName);
}
return parent::label($fieldName, $text, $options);
}
I hope it will help others with the same problem.
Anyway, sorry for the confusion ;) !
I confirmed the error in CakePHP 2.4.0. There is no error from CakePHP 2.4.1 version.
Hello,
Congratulations for your plugin, it's very useful.
However, I noticed that when defining the type of the "input" to radio, the attribute "for" to "label" displays twice the form name :