arguments.event.getValue("eventVariableName")
where "eventVariableName" is the name of the variable in the form/url scope. Simple enough. However, what happens if you have a form with 10 fields. You could recreate the above with 10 lines with a line for each variable in the form/url scope. Not nice and a bit of a pain. An alternative method would be to great a model cfc containing your getters/setters for each form field. Then using ModelGlue, you would call the "makeEventBean" function passing it the instance of your model and then use model.getName() to get the value of the "name" field. <cfset formModelCFC = component.createObject("component", "path.to.formModelCFC") />
<cfset arguments.event.makeEventBean(formModelCFC) />
<cfset name = formModelCFC.getName() />
If you are interested in traveling that route, the method is described in more detail on Dan Willson's blog under So you want to create a ModelGlue:Unity application? (Part 3) [1] <cfset var eventValues = structnew() /> <!--- Get the form/url values ---> <cfset eventValues = arguments.event.getAllValues() />
Links:
[1] http://www.nodans.com/index.cfm/2007/1/21/So-you-want-to-create-a-ModelGlueUnity-application--Part-3-#more
[2] http://blog.tech-cats.com/2008/02/get-all-form-fields-in-modelglue.html