Create form select box with option manually.CakePHP

Tuesday, November 3, 2015

Usually, I always used CakePHP form helper to list down select box with options.



I would like to know,if I can create it manually(I mean without CakePHP form helper) ?



Example:
Using cakephp form helper to create select box



<?php echo $this->Form->input('product_name',array('options'=>$myoptions));?> 


But I want to do something like below



<select name="data[Product][product_name]" id="product">
<options value="1">One</options>
<options value="2">Two</options>
<options value="3">Three</options>
</select>


Any ideas?
Thanks
CakePHP 2.5.7

0 comments:

Post a Comment