Welcome Guest, Not a member yet? Register   Sign In
Form submit using wrong path
#17

[eluser]tonanbarbarian[/eluser]
there is always a bit of a problem with validation because data can be coming from up to 3 places

POST, Validation or the database.

When creating a new record there will not be any POST data nor a record in the database
After the add is submitted if there is a validation error then there is data in both the Validation and POST
If you are editing a record then 2 begin with the database has the only value but after submit of the form then the database, POST and Validation may all have values

You need to decide which to use

You can create a blank validation rule for the phoneNumber field and trry getting the data from $this->validation->phoneNumber but that will only have the value that was converted from POST to the Validation object.

Generally speaking I pass both the Database record and the validation to the view and then from there decide which value to display


Messages In This Thread
Form submit using wrong path - by El Forum - 01-12-2008, 04:00 PM
Form submit using wrong path - by El Forum - 01-12-2008, 04:13 PM
Form submit using wrong path - by El Forum - 01-12-2008, 04:22 PM
Form submit using wrong path - by El Forum - 01-12-2008, 05:19 PM
Form submit using wrong path - by El Forum - 01-12-2008, 05:25 PM
Form submit using wrong path - by El Forum - 01-12-2008, 05:41 PM
Form submit using wrong path - by El Forum - 01-12-2008, 07:52 PM
Form submit using wrong path - by El Forum - 01-12-2008, 10:23 PM
Form submit using wrong path - by El Forum - 01-13-2008, 02:45 AM
Form submit using wrong path - by El Forum - 01-13-2008, 03:41 AM
Form submit using wrong path - by El Forum - 01-13-2008, 06:16 AM
Form submit using wrong path - by El Forum - 01-13-2008, 11:28 PM
Form submit using wrong path - by El Forum - 01-13-2008, 11:48 PM
Form submit using wrong path - by El Forum - 01-13-2008, 11:50 PM
Form submit using wrong path - by El Forum - 01-14-2008, 12:06 AM
Form submit using wrong path - by El Forum - 01-14-2008, 12:25 AM
Form submit using wrong path - by El Forum - 01-14-2008, 12:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB