Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Error on posting of form

Posted on 2003-12-05
5
Medium Priority
?
195 Views
Last Modified: 2013-12-24
Hi Guys....I'm pretty new to coldfusion so I imagine this question will a piece of cake for some of you.  Here goes.

I have a form that processes orders and ultimately sends by coldfusion email.  I have a radio box <input type="radio" name="enable" value="agree">

When I send the form without checking the radio box it does not send and gives me the following error....

enable: #enable#
Name: #name#
Company: #company#
Address: #address#
Tel: #tel#
Email: #email#
Card Type: #card_type#
Name on card: #name_on_card#
Expiry: #expiry#
Card Number: #card_number#
Switch Issue Number: #switch_issue_number#
"

Error resolving parameter ENABLE

ColdFusion was unable to determine the value of the parameter. This problem is very likely due to the fact that either:

You have misspelled the parameter name, or
You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or CFTABLE tag.

I'm not sure if the problem lies with coldfusion but wondered if you could advise?  Thanks!
0
Comment
Question by:aspguru28
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 9

Accepted Solution

by:
shooksm earned 1000 total points
ID: 9885122
The problem is on the Cold Fusion side.  Because HTML does not pass values for unused radio buttons, the ENABLE variable is not available to Cold Fusion.  You have a couple of choices.  You can use the IsDefined function to check to see if it exists before trying to use it, IE:

enable: <cfif IsDefined("enable")>#enable#<cfelse>disagree</cfif>

Or you can use the CFPARAM tag to define a default value for the parameter:

<cfparam default="disagree" name="enable">
0
 
LVL 9

Expert Comment

by:shooksm
ID: 9885145
I should mention that the cfparam needs to exist before you try to use the ENABLE parameter.
0
 

Author Comment

by:aspguru28
ID: 9885342
I got a complilation error....not sure if I've constructed this correctly.  I don't have the option to use coldfusion in the action form only the page it posts to.

<cfparam default="disagree" name="enable">
enable: <cfif IsDefined("enable")>#enable#<cfelse>disagree</cfif>
Name: #name#
0
 
LVL 9

Expert Comment

by:shooksm
ID: 9885394
Put the CFPARAM tag before your CFMAIL tag and you shouldn't need the CFIF tag so you should be able to just use:

enable: #enable#
0
 

Author Comment

by:aspguru28
ID: 9885489
yup I put the CFPARAM tag at the top of the page and bingo.....it works.  Thanks ever so much!
0

Featured Post

Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
The purpose of this video is to demonstrate how to insert an Iframe into WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Open Page or Post…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question