[eluser]Unknown[/eluser]
Hello,
is there a way to dynamically set the default-Value for radio-buttons?
According to the documentation you can set the default-Value for a radio-button like this:
Code:
<input type="radio" name="myradio" value="1" <?php echo set_radio('myradio', '1', TRUE); ?> />
<input type="radio" name="myradio" value="2" <?php echo set_radio('myradio', '2'); ?> />
In my case I read a value from a database and want to activate the according value (1 or 2) in the radio-button. Is there something like
Code:
<input type="radio" name="myradio" value="1" <?php echo set_radio('myradio', '1', $default_1); ?> />
<input type="radio" name="myradio" value="2" <?php echo set_radio('myradio', '2', $default_2); ?> />