/t5/coldfusion-discussions/cfform-conditional-action/td-p/842347May 02, 2006
May 02, 2006
Copy link to clipboard
Copied
I am wondering if you can nest a cfif inside the action
attribute of the cfform tag. I would like to specify two different
form actions depending on the existance of a record in a record
set. Something like this:
<cfform id="form1" name="form1" method="post" action=
<cfif #Form.subid# = #ExistsSubid.subid#>
"Action1.cfm"
<cfelse>
"Action2.cfm"
</cfif>
>
ExistsSubid is the name of the record set, and the form.subid
contains the value I would like to compare with the record
set.