The Form variable in my form is being passed /retrieved via Session.
I have a troublesome Form variable(formField1) that was NOT DEFINED properly in the Session. But the whole form was put into use.Then this particular Form variable(formField1) was filled , and used .Hence this undefined Form variable, got trapped in the Session, as all the form variable is being passed /retrieved via Session for my from. This was throwing an error. I gave a stop gap solution:-
<cfif isDefined("TTsession.filing.formField1")>
<cfset TTD formField1 = TTsession.filing.formField1>
<cfelse>
<cfset TTD formField1 = "0">
</cfif>
TTsession= name of the Session variable formField1=name of the erroneous form field.
As a result of which all the forms in which “TTsession.filing.formField1” was improperly defined are giving an output of “0”.
I do not want this. What I want to do is:
- Check Does form variable EXIST in session?
If yes < cfset FormVar1=session. FormVar1>
If NO a. KILL THE MISSING form variable in that Session. b. re-Define the form variable FormVar1 right here in that Session. < cfset FormVar1=session. FormVar1>
Kindly help me I am using CFMX6.1.
-Rames