02-08-2010, 03:41 PM
[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
while now i use
regards,
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" <?php echo set_select('myselect', 'one', TRUE); ?> >One</option>
<option value="two" <?php echo set_select('myselect', 'two'); ?> >Two</option>
<option value="three" <?php echo set_select('myselect', 'three'); ?> >Three</option>
</select>
while now i use
Code:
$options = array('one' => 'one', 'two'=>'two','three'=>'three');
<?=form_dropdown('myselect', $options);?>
regards,