Skip to main content
July 26, 2006
Answered

Trying to mail user contents I type into textarea

  • July 26, 2006
  • 2 replies
  • 411 views
Okay I have a form with a textarea that allows me to type content. Whatever I type into the textarea named "mailcontent", I want to mail that to someone. When I load this page with the form, I keep getting this error message:

element MAILCONTENT is undefined in FORM.

What am I doing wrong here? I'm attatching the code. Don't worry about the #confirmdelete.EmailAddress# as this works b/c I have another form on this page as well.


This topic has been closed for replies.
Correct answer
Remove the CFMAIL from your page and put it in coop_deleted_sendmail.cfm. The sequence of events (1) the user enters the information into the textarea, (2) user clicks the submit button, (3) coop_deleted_sendmail.cfm loads and processes he CFMAIL tag, at which time it can see and use the value for Form.mailcontent.

2 replies

July 26, 2006
You're right. Thanks.
Correct answer
July 26, 2006
Remove the CFMAIL from your page and put it in coop_deleted_sendmail.cfm. The sequence of events (1) the user enters the information into the textarea, (2) user clicks the submit button, (3) coop_deleted_sendmail.cfm loads and processes he CFMAIL tag, at which time it can see and use the value for Form.mailcontent.
July 26, 2006
Okay, I know how to do that. I was trying to do it all on this page though. I guess that's just not possible. I thought I could enter information in the form and mail at the same time.
July 26, 2006
No can do. Think of what is happening. ColdFusion processes the page on the server before the page is sent to the user.