• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
form_dropdown and set_value???


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
<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>

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


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/

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.