[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:

Fwd: checkboxes (2000) Emailer (1997) Frames and WebCat (1997) {middle} and variables (2002) HELP WITH DATES (1997) WebCatalog2 Feature Feedback (1996) Looking for 24x7 ISP for WebCatalog (1998) Getting the width and height of gif files (2000) OT: Quick poll (2003) Does anyone have a TCPconnect that does multiple sends... (2000) sendmail Q (2001) Error: Can't open order file. (2005) creator code (1997) [LINEITEMS] (2000) Grant, please help me ... (1997) Overwriting databases bug in [closedatabase], garbage filescreated (1998) Rename folder under WC3 (2000) Rhapsody? (1997) problems with 2 tags shakur (1997) Where is f2? (1997)