Re: [ShowIf] a either fields are blank

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 20524
interpreted = N
texte = > I want text to show only if certain fields were left blank. As long > as I specify only one field, this works fine: [ShowIf [eMail]!] Your > forgot your email address[/ShowIf] But I have 10 fields which I would > like for the customer to fill out. I any of these are left blank, I > would like something to show. How do you indicate that if [eMail] or > [FirstName] or etc... are blank, then show a certain text? > This does not work [ShowIf [email]1&[FirstName]!]Your forgot.... > [/ShowIf] I want to avoid using the standard RequiredFields command > Any suggestions?I use the RequiredFields command, but edited the ErrorMessages.db to redirect to a custom error page:RequiredField [redirect /errors/forms.html?command=showpage¶m1=[param1]]This sends the browser and the first missing field (param1) to a page that includes showIf's for each possible missing field:

[showif [param1]=name]You forgot to enter your name.[/showif] [showif [param1]=age]You forgot to enter your age.[/showif] Please use your browser's Back button and complete the form.

The first empty field was enough for me; if you want to list all the missing information, I sure you could come up with a loop that checks param1, param2, param3, etc. Good luck,Brian:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: : Brian.Drum :::::::::::::::::::::::::::::::: mailto:bdrum@aecsoft.com : : Web.Designer :::::::::::::::::::::::::::::::: http://www.aecsoft.com : : AEC.Software;.Inc.:::::::::::::::::::::::::::: tel:703.450.1980 :::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Associated Messages, from the most recent to the oldest:

    
  1. Re: [ShowIf] a either fields are blank (Kenneth Grome 1998)
  2. Re: [ShowIf] a either fields are blank (Scott Szretter 1998)
  3. Re: [ShowIf] a either fields are blank (Brian Willson 1998)
  4. Re: [ShowIf] a either fields are blank (John Hill 1998)
  5. Re: [ShowIf] a either fields are blank (Brian Drum 1998)
  6. Re: [ShowIf] a either fields are blank (Mike Eberly 1998)
  7. [ShowIf] a either fields are blank (Mike Eberly 1998)
> I want text to show only if certain fields were left blank. As long > as I specify only one field, this works fine: [ShowIf [eMail]!] Your > forgot your email address[/ShowIf] But I have 10 fields which I would > like for the customer to fill out. I any of these are left blank, I > would like something to show. How do you indicate that if [eMail] or > [FirstName] or etc... are blank, then show a certain text? > This does not work [ShowIf [email]1&[FirstName]!]Your forgot.... > [/ShowIf] I want to avoid using the standard RequiredFields command > Any suggestions?I use the RequiredFields command, but edited the ErrorMessages.db to redirect to a custom error page:RequiredField [redirect /errors/forms.html?command=showpage¶m1=[param1]]This sends the browser and the first missing field (param1) to a page that includes showIf's for each possible missing field:

[showif [param1]=name]You forgot to enter your name.[/showif] [showif [param1]=age]You forgot to enter your age.[/showif] Please use your browser's Back button and complete the form.

The first empty field was enough for me; if you want to list all the missing information, I sure you could come up with a loop that checks param1, param2, param3, etc. Good luck,Brian:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: : Brian.Drum :::::::::::::::::::::::::::::::: mailto:bdrum@aecsoft.com : : Web.Designer :::::::::::::::::::::::::::::::: http://www.aecsoft.com : : AEC.Software;.Inc.:::::::::::::::::::::::::::: tel:703.450.1980 :::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Brian Drum

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:

autocommit problem (1998) [WebDNA] WebDNA used in US Government work? (2013) Spell Check (2005) [SHOWIF AND/OR] (1997) orderfile cannot be created (2003) [WebDNA] Silly question (2009) Signal Raised Error (1997) 404 error -- but wc code executes... (2001) Generating Report Totals (1997) Re2: frames & carts (1997) RE: Formulas.db + Users.db (1997) [WebDNA] [WSC] WebDNA Development Summit (2014) FEA REQ: One .hdr, multiple .db's (2003) formatting dates from a field ... (1997) WebCat on Alpha? (1997) Re:2nd WebCatalog2 Feature Request (1996) re-sorting founditems (2002) OT: Sendmail (2005) HELP! 10K hits per hour for pages that no longer exist! (2000) DomainList (2005)