Re: [ShowIf] a either fields are blank

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 20532
interpreted = N
texte = At 10/19/98 7:27 am, Mike Eberly wrote:>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?I don't know if it's the easiest way, but we use a couple variables, like so: The errflag variable keeps track of any required field left empty; incrementing errnum keeps track of which one. Like so: [showif [name]=] [showif [math]errflag[/math]=0] [/showif] [/showif] [showif [address]=] [showif [math]errflag[/math]=0] [/showif] [/showif]Then check for the errnum/errflag combos: [showif [math]errflag[/math]>0] Oops! You've forgotten to fill out a required field! Please use your browser's Back button and [showif [math]errnum[/math]=1] tell us your name. Thanks! [/showif] [showif [math]errnum[/math]=2] supply us with your mailing address. Thanks! [/showif] [/showif] [hideif [math]errflag[/math]>0] [/hideif] Like I say, there's probably an easier way.Brian 3IP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Brian Willson Three Islands Press willson@3ip.com http://www.3ip.com/ 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)
At 10/19/98 7:27 am, Mike Eberly wrote:>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?I don't know if it's the easiest way, but we use a couple variables, like so: The errflag variable keeps track of any required field left empty; incrementing errnum keeps track of which one. Like so: [showif [name]=] [showif [math]errflag[/math]=0] [/showif] [/showif] [showif [address]=] [showif [math]errflag[/math]=0] [/showif] [/showif]Then check for the errnum/errflag combos: [showif [math]errflag[/math]>0] Oops! You've forgotten to fill out a required field! Please use your browser's Back button and [showif [math]errnum[/math]=1] tell us your name. Thanks! [/showif] [showif [math]errnum[/math]=2] supply us with your mailing address. Thanks! [/showif] [/showif] [hideif [math]errflag[/math]>0] [/hideif] Like I say, there's probably an easier way.Brian 3IP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Brian Willson Three Islands Press willson@3ip.com http://www.3ip.com/ Brian Willson

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:

Date sorting (1997) I'm new be kind (1997) WCf2 and nested tags (1997) Logging purchases (1997) autocommit problem (1998) WebCat2: Items xx to xx shown, etc. (1997) Sorting Results (1999) WebCatalog can't find database (1997) [OT] See QT? (Was Eaaaasy FTP...) (2003) Auto-email upon restart? (2001) WCS Newbie question (1997) calculating tax rates, mail order solutions and version 2 (1997) Expert tech support -- a fast and simple solution (long) ... (2000) separate by mont (search) (2002) Great product and great job ! (1997) Looking For WebCatalog Migration Assistance (2003) rotating thumbnails (1997) Incrementing a number (1998) Post arguments problem mac? (1997) New Site Announcement (1998)