Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cakephp label in checkbox

i'm trying to get a checkbox with his label

echo $this->Form->checkbox('straordinari', array('div'=>'true', 'label' => 'Straordinari'));

in browser i get

<input id="ReportStraordinari_" type="hidden" value="0" name="data[Report][straordinari]">
<input id="ReportStraordinari" type="checkbox" value="1" label="Straordinari" div="true" name="data[Report][straordinari]">

but there is no label

where is the problem?

like image 764
Matteo Avatar asked May 03 '11 09:05

Matteo


1 Answers

You should get what you are looking for with the following:

echo $this->Form->input('straordinari', array('type' => 'checkbox'));
like image 133
Chuck Burgess Avatar answered Oct 11 '22 22:10

Chuck Burgess