can I provided sample data in input value and still repopulate the field if validation failes |
[eluser]Flying Fish[/eluser]
I would like to provide a default value as an example of what a the user should enter in a few input fields. something like Code: <input value='Enter your date here.' /> But I would also like the form to repopulate with any user entered data if they submit the form and don't pass validation. I'm using Code: set_value('field_name') Any thoughts on how to provide a default value in addition to this? I guess I could use Code: if($_POST['field_name']) { } instead of set_value(), but I was wondering if there is a more snappy codeigniter way to accomplish this Thanks
[eluser]pistolPete[/eluser]
User guide: Quote:set_value()
[eluser]Flying Fish[/eluser]
perfect! sorry I missed that in the documentation |
Welcome Guest, Not a member yet? Register Sign In |