Re: [WebDNA] Checking a radio button

This WebDNA talk-list message is from

2008


It keeps the original formatting.
numero = 101627
interpreted = N
texte = --Apple-Mail-133--207155002 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Hi The line... [!][showif [_CredCardAgree]=][math show=f]OK=0[/math][/showif][/!] ...having [!] at the start and [/!] at the end means it will never be processed by WebDNA Therefore of your three options one of the first two... [showif [math]OK[/math]=1] or [showif [math]OK[/math]=1] ...will always be true and the... [showif [_CredCardAgree]="No"] ...will never be triggered Even if there weren't any [!][/!] blocking the code [_CredCardAgree] being a radio button will never be blank which is what [_CredCardAgree]=] is looking for. Is one of the options for [_CredCardAgree] actually "No" with the quotation marks? That is what you are checking for when you put... [showif [_CredCardAgree]="No"] Try... [showif [_CredCardAgree]=No] A useful debugging trick is to put the variable somewhere visible in your page and see what is actually coming through... _CredCardAgree= [_CredCardAgree] Paul On 15 Dec 2008, at 15:27, Tony Miller wrote: > 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 > > > > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ --Apple-Mail-133--207155002 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi

The = line...

[!][showif [_CredCardAgree]=3D][math = show=3Df]OK=3D0[/math][/showif][/!]

...having [!] at = the start and [/!] at the end means it will never be processed by = WebDNA

Therefore of your three options one of = the first two...

[showif = [math]OK[/math]=3D1]

or

= [showif [math]OK[/math]=3D1]

...will always = be true and the...

[showif = [_CredCardAgree]=3D"No"]

...will never be = triggered

Even if there weren't any [!][/!] = blocking the code [_CredCardAgree] being a radio button will never = be blank which is what [_CredCardAgree]=3D] is looking = for.

Is one of the options = for  [_CredCardAgree] actually "No" with the quotation marks? = That is what you are checking for when you = put...

[showif = [_CredCardAgree]=3D"No"]

Try...

[showif [_CredCardAgree]=3DNo]

A useful = debugging trick is to put the variable somewhere visible in your page = and see what is actually coming = through...

_CredCardAgree=3D [_CredCardAgree= ] 

Paul


<= div>
On 15 Dec 2008, at 15:27, Tony Miller wrote:

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:

=             &n= bsp;    [math show=3Df]OK=3D1[/math]

[showif = [_FirstName]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_LastName]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_Address]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_City]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_State]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_Zip]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_Phone]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_Email]=3D][math show=3Df]OK=3D0[/math][/showif]
[!][showif = [_CredCardAgree]=3D][math show=3Df]OK=3D0[/math][/showif][/!]

[show= if [math]OK[/math]=3D0]
<H1>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.
<p>Please use your browser's Back button to return to the = order form and complete all of the = information.</H1>.
[/showif]

[showif = [math]OK[/math]=3D1]
[showif [validcard accountNum=3D[convertchars = db=3DCleanCard.db][_accountnum][/convertchars]&card=3DVISA+MC+AMEX]!T]=
[math show=3Df]OK=3D0[/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]=3D"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]=3D1]

[orderfile = cart=3D[cart]]

[SetHeader cart=3D[cart]]&[formvariables = name=3D_&exact=3DF]&Header[Index]=3D[url][value][/url]&[/formv= ariables][/SetHeader]

<H3>Your Final Invoice For Order #[cart] = Contains the Following Items</H3>

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

<= br>
---------------------------------------------------------
This = message is sent to you because you are subscribed to
the mailing list = <talk@webdna.us>.
To = unsubscribe, E-mail to: <talk-leave@webdna.us>
archives= : http://mail.webdna.us/l= ist/talk@webdna.us
old archives: http://dev.webdna.us/TalkLi= stArchive/

= --Apple-Mail-133--207155002-- 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)
--Apple-Mail-133--207155002 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Hi The line... [!][showif [_CredCardAgree]=][math show=f]OK=0[/math][/showif][/!] ...having [!] at the start and [/!] at the end means it will never be processed by WebDNA Therefore of your three options one of the first two... [showif [math]OK[/math]=1] or [showif [math]OK[/math]=1] ...will always be true and the... [showif [_CredCardAgree]="No"] ...will never be triggered Even if there weren't any [!][/!] blocking the code [_CredCardAgree] being a radio button will never be blank which is what [_CredCardAgree]=] is looking for. Is one of the options for [_CredCardAgree] actually "No" with the quotation marks? That is what you are checking for when you put... [showif [_CredCardAgree]="No"] Try... [showif [_CredCardAgree]=No] A useful debugging trick is to put the variable somewhere visible in your page and see what is actually coming through... _CredCardAgree= [_CredCardAgree] Paul On 15 Dec 2008, at 15:27, Tony Miller wrote: > 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 > > > > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ --Apple-Mail-133--207155002 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi

The = line...

[!][showif [_CredCardAgree]=3D][math = show=3Df]OK=3D0[/math][/showif][/!]

...having [!] at = the start and [/!] at the end means it will never be processed by = WebDNA

Therefore of your three options one of = the first two...

[showif = [math]OK[/math]=3D1]

or

= [showif [math]OK[/math]=3D1]

...will always = be true and the...

[showif = [_CredCardAgree]=3D"No"]

...will never be = triggered

Even if there weren't any [!][/!] = blocking the code [_CredCardAgree] being a radio button will never = be blank which is what [_CredCardAgree]=3D] is looking = for.

Is one of the options = for  [_CredCardAgree] actually "No" with the quotation marks? = That is what you are checking for when you = put...

[showif = [_CredCardAgree]=3D"No"]

Try...

[showif [_CredCardAgree]=3DNo]

A useful = debugging trick is to put the variable somewhere visible in your page = and see what is actually coming = through...

_CredCardAgree=3D [_CredCardAgree= ] 

Paul


<= div>
On 15 Dec 2008, at 15:27, Tony Miller wrote:

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:

=             &n= bsp;    [math show=3Df]OK=3D1[/math]

[showif = [_FirstName]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_LastName]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_Address]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_City]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_State]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_Zip]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_Phone]=3D][math show=3Df]OK=3D0[/math][/showif]
[showif = [_Email]=3D][math show=3Df]OK=3D0[/math][/showif]
[!][showif = [_CredCardAgree]=3D][math show=3Df]OK=3D0[/math][/showif][/!]

[show= if [math]OK[/math]=3D0]
<H1>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.
<p>Please use your browser's Back button to return to the = order form and complete all of the = information.</H1>.
[/showif]

[showif = [math]OK[/math]=3D1]
[showif [validcard accountNum=3D[convertchars = db=3DCleanCard.db][_accountnum][/convertchars]&card=3DVISA+MC+AMEX]!T]=
[math show=3Df]OK=3D0[/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]=3D"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]=3D1]

[orderfile = cart=3D[cart]]

[SetHeader cart=3D[cart]]&[formvariables = name=3D_&exact=3DF]&Header[Index]=3D[url][value][/url]&[/formv= ariables][/SetHeader]

<H3>Your Final Invoice For Order #[cart] = Contains the Following Items</H3>

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

<= br>
---------------------------------------------------------
This = message is sent to you because you are subscribed to
the mailing list = <talk@webdna.us>.
To = unsubscribe, E-mail to: <talk-leave@webdna.us>
archives= : http://mail.webdna.us/l= ist/talk@webdna.us
old archives: http://dev.webdna.us/TalkLi= stArchive/

= --Apple-Mail-133--207155002-- Paul Willis

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:

Post (1997) intel webdna? (2007) remotely add + sign (1997) WC Database Format (1997) Re:2nd WebCatalog2 Feature Request (1996) [WebDNA] WebDNA Crashing or Not **YES** (2008) [WebDNA] WebDNA licenses discount from 12/23 to 12/31 (2012) GD Spam (2003) WebCat2 - Getting to the browser's username/password data (1997) Emailer setup (1997) Logic question (2002) Getting total number of items ordered (1997) showif with math? (2000) More questions about serial number dishing (1997) OFF-TOPIC...list serve software for newsletter? (1998) WebCat2b13MacPlugIn - syntax to convert date (1997) Expected Behavior? (1999) Emailer setup (1997) f2 download problems (1997) WCS Newbie question (1997)