Welcome Guest, Not a member yet? Register   Sign In
form_dropdown and set_value???
#1

[eluser]123wesweat[/eluser]
Hi,

1/ How do i select an already selected dropdown option???

2/ How do i combine set_value (form helper) with values read from a db??

3/ Set_value only works on input fields which are required, is this correct???

4/ Or should i not only use form_helper but use
Code:
<select name="myselect">
<option value="one" &lt;?php echo set_select('myselect', 'one', TRUE); ?&gt; >One</option>
<option value="two" &lt;?php echo set_select('myselect', 'two'); ?&gt; >Two</option>
<option value="three" &lt;?php echo set_select('myselect', 'three'); ?&gt; >Three</option>
</select>

while now i use
Code:
$options = array('one' => 'one', 'two'=>'two','three'=>'three');
&lt;?=form_dropdown('myselect', $options);?&gt;

regards,


Messages In This Thread
form_dropdown and set_value??? - by El Forum - 02-08-2010, 03:41 PM
form_dropdown and set_value??? - by El Forum - 08-05-2010, 04:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB