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,
#2

[eluser]Cambo[/eluser]
Hi, i had the same problem.
Not sure if you found the answer to this, but it is here - http://ellislab.com/forums/viewreply/668894/




Theme © iAndrew 2016 - Forum software by © MyBB