Link to home
Start Free TrialLog in
Avatar of TimDg
TimDg

asked on

Context issues using CFFORM with CFC procedure calls

I may be out of luck, but it's worth asking:

I need to build a form with several required elements, but I use procedure calls to build these elements.  For instance one procedure call should build several <cfinput> tags.  But since all of the tags need to be on the same form, I can't start the cfform in the procedure call, creating a context error.

For example:
<cfform name="exam" method="post">
<cfoutput query="qGetQ">
   <cfinvoke
     component="app.assessment.cfc.#qGetQ.handler#"
     method="getAssessmentView">
       <cfinvokeargument name="pID" value="#qGetQ.question_id#">
       <cfinvokeargument name="pNum" value="#qNum#">
   </cfinvoke>
</cfoutput>
</cfform>

The problem is the procedure cannot see that I've started the <cfform> tag.  Error message:
 Context validation error for tag cfinput.
 The tag must be nested inside a cfform tag.

Is it possible at all to let the procedure see that the tag has been made in the calling page.  I checked and there is no Caller scope in a CFC procedures, and none of the other scopes seem to have any data related to the <cfform> tag.

Thanks for any input and suggestions
ASKER CERTIFIED SOLUTION
Avatar of Dain_Anderson
Dain_Anderson

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TimDg
TimDg

ASKER

That's about what I figured :)  We're not actually using CFFORM, but our own custom tag set that manages our form validation.  It's much more advanced than normal cfform, but again the tags are dependent.  We've been continuing to brainstorm and have come up with several work arounds, but none that would be as straight forward as I would like.  Something I suppose we'll continue working with.

Thank you for your comments.