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 toredirect 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 pagethat 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 themissing information, I sure you could come up with a loop that checksparam1, 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:
> 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 toredirect 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 pagethat 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 themissing information, I sure you could come up with a loop that checksparam1, 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:
Re1000001: Setting up shop (1997)
WebCatalog for guestbook ? (1997)
Re:no [search] with NT (1997)
Browser Caching (2003)
Protect (1997)
protect tag on NT (1997)
Just Testing (1997)
Re:How to Display text in empty fields (1997)
still having shipCost.db Problem (1997)
2.1.1 bug (ORDERFILE/SHOWIF/LINEITEMS) (1998)
MacWEEK article help needed (1996)
Webcat Hosting in London or UK (2003)
Help! WebCat2 bug (1997)
WebCatalog2 Feature Feedback (1996)
[WebDNA] Feature Request (2013)
Re:I've had it! (1999)
Storebuilder Seems to have just died (2003)
Processing all html files through WebCat or Typhoon (1998)
Max Record length restated as maybe bug (1997)
WebCat2b13MacPlugIn - [include] doesn't allow creator (1997)