how to use multiple checkbox in phalcon

echo $this->tag->checkField( array( "floortypes", array( 'Wood'=>'Wood', 'Granite'=>'Granite', 'Marble'=>'Marble', 'Laminate'=>'Laminate', 'Carpet'=>'Carpet', 'Tile'=>'Tile', 'Other'=>'Other' ), "class" => "form-control", ) );

                            this is my old code


31.2k

Hi,

try with:


echo $this->tag->checkField( array( "floortypes[]", 'Wood'=>'Wood') );
echo $this->tag->checkField( array( "floortypes[]", 'Granite'=>'Granite') );

according to http://www.formget.com/php-checkbox/

but I didn't try it ...

I think this is how you do it. Just remember to specify the value for each checkbox and you are good.

Hi,

try with:


echo $this->tag->checkField( array( "floortypes[]", 'Wood'=>'Wood') );
echo $this->tag->checkField( array( "floortypes[]", 'Granite'=>'Granite') );

according to http://www.formget.com/php-checkbox/

but I didn't try it ...