Welcome Guest, Not a member yet? Register   Sign In
Edit, validate, re-edit issue using set_value with optional parameter
#3

[eluser]bretticus[/eluser]
You certainly don't need two forms. Form validation works best when the controller loads the view form and the form action is set to the very same controller path.

Typically the controller looks like...

Declare all the rules for the form (even on the initial pageload.)

Run the validation libs Run() method.
if it fails, load the view with the form. It will always fail the first time because there is no post data yet.

In your view, set_value() should work as long as you are setting the array keys in accordance with the variable names in your view. Make sure you initialize these variables so that they are empty arrays elements at least to avoid Undefined Variable notices (not errors.)


Messages In This Thread
Edit, validate, re-edit issue using set_value with optional parameter - by El Forum - 03-18-2010, 11:41 PM



Theme © iAndrew 2016 - Forum software by © MyBB