Welcome Guest, Not a member yet? Register   Sign In
Reusing the same form code for creating and editing
#3

[eluser]marcoss[/eluser]
I use a custom helper function that performs a various checks, it takes two arguments: field($key = '', $data = '').

It searches for the key in the post array and if it finds the key it will return the value, if there is no such a key in the request then it looks for the same key (ot property) in the $data (array|object), if that doesn't work either it will just return and empty string.


Messages In This Thread
Reusing the same form code for creating and editing - by El Forum - 06-24-2007, 11:42 AM
Reusing the same form code for creating and editing - by El Forum - 06-24-2007, 01:52 PM
Reusing the same form code for creating and editing - by El Forum - 06-24-2007, 06:58 PM
Reusing the same form code for creating and editing - by El Forum - 10-01-2007, 10:25 AM
Reusing the same form code for creating and editing - by El Forum - 10-01-2007, 11:56 AM
Reusing the same form code for creating and editing - by El Forum - 10-01-2007, 12:11 PM



Theme © iAndrew 2016 - Forum software by © MyBB