Welcome Guest, Not a member yet? Register   Sign In
set_value not working when using form_input function
#1

[eluser]bhbutter123[/eluser]
I have code like this
for($i = 1; $i<= 16; $i++){
echo form_input('field'.$i, set_value('field'.$i));
echo br();
}
to generate a bunch of fields(no this isn't for a live site) and when it fails(i have field1 as required and leave it blank) then the form doesn't repopulate but when I stick in $_POST['field'.$i] as the value it works after the submit. (beforehand it throws errors of course)

Why is set_value not working?
#2

[eluser]mrh[/eluser]
Reading set_value() docs...




Theme © iAndrew 2016 - Forum software by © MyBB