Skip to content

Do I Need To Use CFParam For Form And URL Variables

dskaggs edited this page Jan 9, 2013 · 2 revisions

There's no need to cfparam any form or url parameters. ModelGlue automatically puts all URL and form variables into the event object to make it easy for you to find them. You just need to use the event object to retrieve values (see below).

<cfset UserAge = event.getValue("UserAge") />

Should a variable not exist in the event object, ModelGlue will return an empty string. You can optionally set a default value to use in case the variable doesn't exist in the event (see below)

<cfset UserAge = event.getValue("UserAge", 42) />

See Event API documentation for more information).

Clone this wiki locally