![]() |
form question - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: form question (/showthread.php?tid=26379) |
form question - El Forum - 01-12-2010 [eluser]dadamssg[/eluser] Can you not combine the form_input(), form_dropdown(), and form_textarea()'s with set_values() ???? It shows using set_values when you don't use the form library to help you create the input fields. im trying not to lose all of their input data if they submit my form and it doesn't pass my validation and the form gets redisplayed. form question - El Forum - 01-12-2010 [eluser]danmontgomery[/eluser] Code: echo form_input('fieldname', set_value('fieldname')); Will work. I haven't used it with form_dropdown, but something like: Code: $values = array(1 => "Value 1", 2 => "Value 2", 3 => "Value 3"); Should work as well. If you are manually creating the select field you can use set_select() instead. form question - El Forum - 01-12-2010 [eluser]dadamssg[/eluser] awesome. thanks |