--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cfwheels?hl=en.
--
You received this message because you are subscribed to the Google Groups
"ColdFusion on Wheels" group.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to
cfwheels+u...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+u...@googlegroups.com.
Hi Greg,One thing you might find useful is to combine the new and create functions into a single action, that way the user remains on the same url and the code ends up much simpler overall.
Here's an example:<cffunction name="new"><cfif StructKeyExists(params, "user")><cfset user = model("User").new(params.user)> <!--- this checks to see if the form has been submitted ---><cfif user.save()><cfset flashInsert(success="User has been created.")><cfset redirectTo(action="index")></cfif><cfelse><cfset user = model("User").new()> <!--- no form submission, so just create a new blank user ---></cfif></cffunction>Andy
To unsubscribe from this group, send email to cfwheels+u...@googlegroups.com.
--
--
To unsubscribe from this group, send email to cfwheels+u...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+u...@googlegroups.com.