[WebDNA] Checking a radio button

This WebDNA talk-list message is from

2008


It keeps the original formatting.
numero = 101626
interpreted = N
texte = Everyone, I am a neophite WebDNA user and need some help. I am trying to do checking on a radio button to ensure that users have read the credit card agreement and have checked the "Yes" button so they cannot dispute the charges on their card. I created a variable called "_CredCardAgree" and am getting the correct value in the email I am sending, but it is not checking. It processes regardless of which option is checked. I have taken the following code, which all works, except for the _CredCardAgree part, and checks for missing fields and invalid credit card numbers: [math show=f]OK=1[/math] [showif [_FirstName]=][math show=f]OK=0[/math][/showif] [showif [_LastName]=][math show=f]OK=0[/math][/showif] [showif [_Address]=][math show=f]OK=0[/math][/showif] [showif [_City]=][math show=f]OK=0[/math][/showif] [showif [_State]=][math show=f]OK=0[/math][/showif] [showif [_Zip]=][math show=f]OK=0[/math][/showif] [showif [_Phone]=][math show=f]OK=0[/math][/showif] [showif [_Email]=][math show=f]OK=0[/math][/showif] [!][showif [_CredCardAgree]=][math show=f]OK=0[/math][/showif][/!] [showif [math]OK[/math]=0]

You have not provided information in all of the required fields. You must have first and last name, address, city, state, zip, phone and valid email address so we can ship your order and contact you if there are problems with your order.

Please use your browser's Back button to return to the order form and complete all of the information.

. [/showif] [showif [math]OK[/math]=1] [showif [validcard accountNum=[convertchars db=CleanCard.db] [_accountnum][/convertchars]&card=VISA+MC+AMEX]!T] [math show=f]OK=0[/math] The credit card number entered ([_accountNum]) is not valid. Check to make sure you did not mis-type any numbers or enter any extra characters. Please back up using your back button and re-enter and double-check the number again. [/showif] [/showif] [showif [_CredCardAgree]="No"] You failed to agree to the Credit Card Statement. We cannot process online orders unless you have agreed to allow us to charge your credit card for your purchases. Credit Card charges are not disputable after you submit your order. Please back up using your back button and re-enter and double-check the number again. [/showif] [showif [math]OK[/math]=1] [orderfile cart=[cart]] [SetHeader cart=[cart]]&[formvariables name=_&exact=F]&Header[Index]= [url][value][/url]&[/formvariables][/SetHeader]

Your Final Invoice For Order #[cart] Contains the Following Items

I'm reading the programming guide now for insights, but need to get this live as soon as possible. (That's a surprise, right?) I tried putting it inside a math block like the credit card validation, adding it to the first group of "showif"s and it would not display an error page. Thanks for any help in advance. Tony Miller tmiller@thehawkeye.com Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Checking a radio button (Tony Miller 2008)
  2. Re: [WebDNA] Checking a radio button (Paul Willis 2008)
  3. [WebDNA] Checking a radio button (Tony Miller 2008)
Everyone, I am a neophite WebDNA user and need some help. I am trying to do checking on a radio button to ensure that users have read the credit card agreement and have checked the "Yes" button so they cannot dispute the charges on their card. I created a variable called "_CredCardAgree" and am getting the correct value in the email I am sending, but it is not checking. It processes regardless of which option is checked. I have taken the following code, which all works, except for the _CredCardAgree part, and checks for missing fields and invalid credit card numbers: [math show=f]OK=1[/math] [showif [_FirstName]=][math show=f]OK=0[/math][/showif] [showif [_LastName]=][math show=f]OK=0[/math][/showif] [showif [_Address]=][math show=f]OK=0[/math][/showif] [showif [_City]=][math show=f]OK=0[/math][/showif] [showif [_State]=][math show=f]OK=0[/math][/showif] [showif [_Zip]=][math show=f]OK=0[/math][/showif] [showif [_Phone]=][math show=f]OK=0[/math][/showif] [showif [_Email]=][math show=f]OK=0[/math][/showif] [!][showif [_CredCardAgree]=][math show=f]OK=0[/math][/showif][/!] [showif [math]OK[/math]=0]

You have not provided information in all of the required fields. You must have first and last name, address, city, state, zip, phone and valid email address so we can ship your order and contact you if there are problems with your order.

Please use your browser's Back button to return to the order form and complete all of the information.

. [/showif] [showif [math]OK[/math]=1] [showif [validcard accountNum=[convertchars db=CleanCard.db] [_accountnum][/convertchars]&card=VISA+MC+AMEX]!T] [math show=f]OK=0[/math] The credit card number entered ([_accountNum]) is not valid. Check to make sure you did not mis-type any numbers or enter any extra characters. Please back up using your back button and re-enter and double-check the number again. [/showif] [/showif] [showif [_CredCardAgree]="No"] You failed to agree to the Credit Card Statement. We cannot process online orders unless you have agreed to allow us to charge your credit card for your purchases. Credit Card charges are not disputable after you submit your order. Please back up using your back button and re-enter and double-check the number again. [/showif] [showif [math]OK[/math]=1] [orderfile cart=[cart]] [SetHeader cart=[cart]]&[formvariables name=_&exact=F]&Header[Index]= [url][value][/url]&[/formvariables][/SetHeader]

Your Final Invoice For Order #[cart] Contains the Following Items

I'm reading the programming guide now for insights, but need to get this live as soon as possible. (That's a surprise, right?) I tried putting it inside a math block like the credit card validation, adding it to the first group of "showif"s and it would not display an error page. Thanks for any help in advance. Tony Miller tmiller@thehawkeye.com Tony Miller

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Problems appending to database (1997) Revisit: speed test (2002) Webcatalog 4.0 - Storebuilder (2000) Download capabilities (1997) [OT] Airport Problem (2003) Getting Averages for online form. (1999) Country & Ship-to address & other fields ? (1997) Showif Error Generated... (2003) Searching Multiple DBs (1997) WebMerchant when CC network is down (1998) Re:Copyright ? (1997) Testing the WebCat Email List Members (2000) close to comparison (2000) taxTotal confusion (1998) Data Entry ... Excel Style ... How To? (2001) FAX orders (1996) Emailer problems. (1998) OT-Load balance (2004) WebDNA Module with Apache 2.2 (2006) Bug Report, maybe (1997)