Radio button didn't behave correctly in my block
|
voyager
Joined: 2009-01-06
Posts: 7 |
Posted: Sun, 2009-10-04 22:05
|
|
Im work on my first module block to display two radio buttons to let user makes a choice: <In my module block template file> Where $myId and $myChoices are initiated as: When I enabled the module and block, the code does disaplyed a pair of radio buttons. But it always have the first button ("No") selected, even though I set "selected" to "2". A view source showed the page: Why the radio buttons didn't show the correct checked button? Also, how could I add a callback function if user click one of the button? I'd appreciate if you also can point to some exapmples. Eric. |
|
| Login or register to post comments |

Posts: 16320
I think you have to add selected to the {html_radios...}
http://www.smarty.net/manual/en/language.function.html.radios.php
You will need to find an existing example of how this works for callbacks. I am not well versed with this.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team