Welcome Guest, Not a member yet? Register   Sign In
Repopulating HTML select after failed form validation
#1

[eluser]richzilla[/eluser]
Hi all.

How would i got about repopulating an HTML select with the users input after failed validation. I can do it with normal text fields, just by using
Code:
<?php echo set_value('field'); ?>
however, i cant see anyway to do it with a dropdown.

Im using the CI form_dropdown function and ive got a default option (Please Select...), and a callback to ensure that users select something other than the default. However if a different field on the form fails validation, when the form is repopulated, the dropdown reverts to its default.

Any help would be appreciated.

Thanks


Messages In This Thread
Repopulating HTML select after failed form validation - by El Forum - 01-12-2010, 07:04 AM
Repopulating HTML select after failed form validation - by El Forum - 01-12-2010, 07:18 AM
Repopulating HTML select after failed form validation - by El Forum - 01-12-2010, 08:35 AM
Repopulating HTML select after failed form validation - by El Forum - 01-12-2010, 12:01 PM
Repopulating HTML select after failed form validation - by El Forum - 01-12-2010, 08:12 PM
Repopulating HTML select after failed form validation - by El Forum - 01-20-2010, 12:32 PM
Repopulating HTML select after failed form validation - by El Forum - 01-20-2010, 04:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB