Welcome Guest, Not a member yet? Register   Sign In
form question
#1

[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.
#2

[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");
echo form_dropdown('fieldname', $values, set_value('fieldname'));

Should work as well. If you are manually creating the select field you can use set_select() instead.
#3

[eluser]dadamssg[/eluser]
awesome. thanks




Theme © iAndrew 2016 - Forum software by © MyBB