Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using a form inside a cfmail tag

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,
My code is sending a survey form to the users and getting their response through email.
I am using a form inside cfmail tag . I need the values selected or entered in the form to be posted to another cfm page. The email works fine. But I'm not able to get the form field values entered in the form into the action page.Here is my code

<cfmail to=&quot;xxx&quot; from=&quot;yyy&quot; subject=&quot;Request Follow-up&quot; type=&quot;html&quot; >
<form action=&quot;http:\\xxxx\copy_email.cfm&quot; method=&quot;POST&quot; name=&quot;send&quot; >
Please provide us assistance by answering the 3 questions below: <p>
Has your problem been solved?
<SELECT name=&quot;xx&quot;>
<option value=&quot;No&quot; selected>No
<option value=&quot;Yes&quot;>Yes
</select>
<input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Submit survey&quot;>
</form>
</cfmail>


The action page &quot;copy_email.cfm&quot; is:

<cfoutput>Survey Report: #form.xx# </cfoutput>

I am not able to see the value of the #form.xx# in the action page. It gives the following error message

&quot;An error occurred while evaluating the expression:

#form.xx#

Error near line 12, column 42.


Error resolving parameter FORM.XX

The specified form field cannot be found. This problem is very likely due to the fact that you have misspelled the form field name.

The error occurred while processing an element with a general identifier of (#form.xx#), occupying document position (12:41) to (12:49) in the template file&quot;



Please let me know how to solve this. Thanks in advance.
 
I wonder if the problem is that the mail server doesn't support the post method. Try method=&quot;get&quot;, which will put your form fields on the URL string as URL variables instead.

The other thing I would investigate is cutting your mail message, pasting it intact into a blank page, save it as an html page, then access it through a browser. If the page works, then the problem is definitely the mail server not REALLY being a browser.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top