![]() |
|
|||
|
Place this code in your view:
[PHP] <p> <?= $this->formRadio('johnsmith', '1', array(), array('1' => 'Yes', '0' => 'No'), ' '); ?> <strong>John Smith</strong> </p> <p> <?= $this->formRadio('peterfallon', '1', array(), array('1' => 'Yes', '0' => 'No'), ' '); ?> <strong>Peter Fallon</strong> </p> [/PHP] Which will output exactly the same as you described: [HTML] <p> <label for="johnsmith-1"> <input type="radio" name="johnsmith" id="johnsmith-1" value="1" checked="checked"> Yes</label> <label for="johnsmith-0"> <input type="radio" name="johnsmith" id="johnsmith-0" value="0"> No</label> <strong>John Smith</strong> </p> <p> <label for="peterfallon-1"> <input type="radio" name="peterfallon" id="peterfallon-1" value="1" checked="checked"> Yes</label> <label for="peterfallon-0"> <input type="radio" name="peterfallon" id="peterfallon-0" value="0"> No</label> <strong>Peter Fallon</strong> </p> [/HTML] I know, there isn't enough documentation about some of the form view helpers out there... You need to take a look at the sourcecode sometimes
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
| Designed by: Miner Skinz |
Powered by vBulletin® Version 3.8.4 Copyright ©2000 - 2010, Jelsoft Enterprises Ltd. Search Engine Friendly URLs by vBSEO 3.1.0 |
![]() |