脚本宝典收集整理的这篇文章主要介绍了在Cakephp中创建单选按钮的表单助手,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
<div data-attr="radio" id="1"> <label id="label1">UntITled1</label><br/> <input tyPE="radio" value="option1" id="Radio11" name="Workexperience"/> <label for="Radio11">Option1</label> <input type="radio" value="option2" id="Radio12" name="Workexperience"/> <label for="Radio12">Option2</label> </div>
对于无线电类型输入,“分隔符”属性可用于注入标记以分隔每个输入/标签对.
代码视图
<?PHP echo $form->input('field',array( 'before' => '--before--','after' => '--after--','between' => '--between---','separator' => '--separator--','options' => array('1','2'),'type' => 'radio' ));?>
输出:
<div class="input"> --before-- <input name="data[User][field]" type="radio" value="1" id="UserField1" /> <label for="UserField1">1</label> --separator-- <input name="data[User][field]" type="radio" value="2" id="UserField2" /> <label for="UserField2">2</label> --between--- --after-- </div>
以上是脚本宝典为你收集整理的在Cakephp中创建单选按钮的表单助手全部内容,希望文章能够帮你解决在Cakephp中创建单选按钮的表单助手所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。