Welcome Guest, Not a member yet? Register   Sign In
set_value and populating a form with values from the database
#3

[eluser]everdaniel[/eluser]
[quote author="w3bm" date="1232131856"]http://ellislab.com/forums/viewthread/97495/

that post may give you a bit of help

Im still learning myself though too :-)[/quote]

hey w3bm!

I found out what the problem is a few hours ago, it turns out that the rules are set if there are data in the $_POST var, if there is none which is the most common scenario (since most of the time you click a link to go to an edit page), the rules are not set and the set_value function works (since the fields are not set in the form_validation library).

Problem is, I'm not going to the edit page through a link, I'm using a submit button, means the $_POST var is not empty, rules are set, fields are set, set_value doesn't work because it tries to return the postdata value (which is empty).

I'm not sure if this is a bug or is an "error of logic" on my end... Big Grin


Messages In This Thread
set_value and populating a form with values from the database - by El Forum - 01-16-2009, 07:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB