Well I'm back again for the 2nd time today. I'd like to thank
everyone who helped me out with my last issue. But now I have
another issue that I'm trying to work out. Craig & Dan here
helped me with sending out 2 separate email responders based off of
questions asked in the cfform.
You can view the form at this link:
http://mswebsol.com/gaslockguarantee/creditapplication.cfm
The problem I'm having right now is that I'm not getting the
results I'm looking for. Basically lets say you choose yes for 4
questions but on the 5th question you choose no. Well as it stands
right now the script will send out the email response that says
your accepted. But what I'm trying to do is if you choose no for
any one of the questions you will automatically get an email
response that says you're not accepted.
If I choose no for the first question I will get the correct
email response which is "your not accepted" so it works for the
first question. But if you choose yes for the first question and no
for the 2nd or any other question you will get the wrong response
that says "you are accepted."
So here's the code
<cfif StructKeyExists(form,"Q1")>
<cfif form.Q1 is "yes">
<cfmail>accepted....</cfmail>
<cfelse>
<cfmail>not accepted...</cfmail>
</cfif>
<cfelseif StructKeyExists(form,"Q2")>
<cfif form.Q2 eq "yes">
<cfmail>accepted....</cfmail>
<cfelse>
<cfmail>not accepted...</cfmail>
</cfif>
<cfelseif StructKeyExists(form,"Q3")>
<cfif form.Q3 eq "yes">
<cfmail>accepted....</cfmail>
<cfelse>
<cfmail>not accepted...</cfmail>
</cfif>
<cfelseif StructKeyExists(form,"Q4")>
<cfif form.Q4 eq "yes">
<cfmail>accepted....</cfmail>
<cfelse>
<cfmail>not accepted...</cfmail>
</cfif>
<cfelseif StructKeyExists(form,"Q5")>
<cfif form.Q5 eq "yes">
<cfmail>accepted....</cfmail>
<cfelse>
<cfmail>not accepted...</cfmail>
</cfif>
</cfif>
Any help would greatly be appreciated!
Thank you all
Derek Bess
Newbie @ Coldfusion