Discuss Email Form - Beginner in the ColdFusion Development forum on Dev Shed. Email Form - Beginner ColdFusion Development forum discussing CFML coding practices, tips on CFML, and other CFML related topics. Find out why ColdFusion is the tool of choice for many e-commerce developers.
The ASP Free website provides in-depth information on the latest developer tools available from Microsoft. Our cadre of writers, highly experienced industry experts, reveals the best ways to use established technologies as well as new and emerging technologies. Our coverage of Microsoft's development and administration technologies is among the most respected in the IT industry today.
ASP Free and Iron Speed Designer are giving away $5,500+ in FREE licenses. Iron Speed's RAD CASE toolset can save up to 80% of your coding time. One free license per week, one perpetual license per month! Download and Activate to enter!
Intel® Graphics Performance Analyzers is a powerful tool suite for analyzing and optimizing your games, media, and graphics-intensive applications. Used by some of the best developers on the planet, Intel GPA lets you maximize your app’s performance.
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
Email Form - Beginner
I am new to cold fusion and have limited skills. My email form is working in a basic sense. I am getting an error at the bottom of my page, but I can still enter information and it emails the information correctly.
The error is:
--------------------------------------------------------------------------------
Error Diagnostic Information
An error occurred while evaluating the expression:
#Form.Hear#
Error near line 113, column 46.
Error resolving parameter FORM.HEAR
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.Hear#), occupying document position (113:45) to (113:55).
I also get an error when I don't fill in the checkbox and it DOES NOT email the information correctly in this case. The error is:
--------------------------------------------------------------------------------
Error Diagnostic Information
An error occurred while evaluating the expression:
#Form.Credentials#
Error near line 117, column 15.
Error resolving parameter FORM.CREDENTIALS
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.Credentials#), occupying document position (117:14) to (117:31).
Where user heard about Jump Start Listserv: #Form.Hear#
If completed Other: #Form.HearOther#
Area of Practice: #Form.Practice#
If completed Other: #Form.PracticeOther#
Credentials: #Form.Credentials#
If completed Other: #Form.CredentialsOther#
Posts: 30
Time spent in forums: < 1 sec
Reputation Power: 11
I take it that the <cfmail> block is only evaluated when the form fields are available, ie: after form submital? If not, it's what's causing your problem. I'll show you the easiest way to do this.
Regarding the checkbox, the problem is due to the fact that if no box is checked, the variable will not be present on the target page. The easiest wat to fix this, in your case, would be to use radio buttons for the Credentials element instead. It's of course possible to keep using a checkbox if you'd like, but I think radio buttons are more appropriate for this particular question in any case.
In your case the easiest way to do the redirect is probably with cflocation.
For whatever value you want to be the default, add selected="selected" to the input tag. It's important that you do this, otherwise, if the user forgets to choose one an error will be produced.
__________________
...better lives have been lived in the margins, locked in the prisons and lost on the gallows than have ever been enshrined in palaces.
Last edited by cfgeek : June 6th, 2003 at 08:55 PM.
Posts: 7,130
Time spent in forums: 6 Days 17 h 43 m 36 sec
Reputation Power: 1889
Quote:
Originally posted by cfgeek Hey, I'm just glad to post in thread that isn't a CF v PHP flame war
Agreed - There should be a moratorium on Language vs. Language flame wars on Devshed, unless of course you're posting in the Lounge.
Oh - bashing C#/VB/ASP/.NET is OK, tho - its always open season on those guys. (j/k)
__________________ DrGroove, Devshed Moderator | New to Devshed? Read the User Guide | Follow DrGroove on Twitter. Or don't. FWIW, I think Twitter is kinda lame.