Thursday, 15 January 2015

CakePHP - How to add attributes to individual radio buttons? -



CakePHP - How to add attributes to individual radio buttons? -

how add together individual attributes radio buttons? far can tell, cakephp allows add together same (limited) attributes radio buttons in group.

any ideas how generate this, example?

<input type="radio" checked="checked" value="0" name="data[mymodel][field]" id="custom-id-1" class="custom-class-1" data-something="test1"> <label for="custom-id-1">test 1</label> <input type="radio" checked="checked" value="0" name="data[mymodel][field]" id="custom-id-2" class="custom-class-2" data-something="test2"> <label for="custom-id-2">test 2</label>

echo $this->form->input('title', array('type' => 'radio', 'class' => 'custom-class', 'atributename' => 'attributevalue'));

cakephp radio-button

No comments:

Post a Comment