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

[eluser]ITT-Nico[/eluser]
Hey guys, i have a little problem with the form helper. i have the following code inside my view:

Code:
<?php
    echo form_open('content');
    $value = set_value('filter', 'empty');
    echo form_input('filter', $value);
    echo form_submit('submit', 'Filter');
    echo form_close();
    echo form_open('content');
    echo form_hidden('filter', '');
    echo form_submit('submit', 'Reset');
    echo form_close();
?>

but the value is not correct when the form is submitted... after submitting the value is reset to "empty", any ideas?

(im using the newest version of CI)

THx !
#2

[eluser]morehawes[/eluser]
I was stuck on this for a while too. It appears to be a bug in CI and occurs if you do not have a validation rule set for the field. I found a fix here (by jbreitweiser) that worked a charm for me :

http://ellislab.com/forums/viewthread/96617/P15/#689642

Hope that helps!
#3

[eluser]ITT-Nico[/eluser]
thx! works fine




Theme © iAndrew 2016 - Forum software by © MyBB