Re: _ in front of field name

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 18913
interpreted = N
texte = >>At 13:31 Uhr 15.07.1998, Sue Ann Sanders wrote: >>>What is the significance of a _ in front of the field names within a >>>form?At 14:41 Uhr 15.07.1998, Sue Ann Sanders wrote: >Is there documentation on this _ thing?No, you can use anything. It is just helpful for the programmer and has no special meaning to WebCat. Name it sue.Date if you like. I recommend to use a prefix only, not a suffix to mark your fields and variables. This is easier to handle. If you submit a form with WebCat ALL variables and fields go to the following page. You can check this with [formvariables]. If you have your special prefix, it is easy to find out wether a variable is a form field or not. >Is there a list of reserved words?Yes for variables: all commands of WebCat ;-) (a form field is a variable too, once the form got submitted) But instead comparing all self-invented name against the list of commands, we simply add something to the name - to avoid conflicts.Generally: if you have your own unique names for fields and variables, you are on the safe side. For example v.MyName for a variable and f.MyName for a field will let you easily find out which kind of variable you are dealing with, and they get never confused with WebCat-commands.To see what we are talking about, set up a simple page with a form like this:
And on the page response.tpl you write: [formvariables] [name]=[value]
[/formvariables]Then fill in the fields and submit the form: response.tpl will list all variables it got from the previous page, line by line. Now you can imagine that it is quite easy to find out which variables are user-entered fields and do some action on them. Peter__________________________________________ Peter Ostry - po@ostry.com - www.ostry.com Ostry & Partner - Ostry Internet Solutions Auhofstrasse 29 A-1130 Vienna Austria fon ++43-1-8777454 fax ++43-1-8777454-21 Associated Messages, from the most recent to the oldest:

    
  1. Re: _ in front of field name (Kenneth Grome 1998)
  2. Re: _ in front of field name (Kenneth Grome 1998)
  3. Re: _ in front of field name (Peter Ostry 1998)
  4. Re: _ in front of field name (Brian B. Burton 1998)
  5. Re: _ in front of field name (John Hill 1998)
  6. Re: _ in front of field name (Sue Ann Sanders 1998)
  7. Re: _ in front of field name (Peter Ostry 1998)
  8. _ in front of field name (Sue Ann Sanders 1998)
>>At 13:31 Uhr 15.07.1998, Sue Ann Sanders wrote: >>>What is the significance of a _ in front of the field names within a >>>form?At 14:41 Uhr 15.07.1998, Sue Ann Sanders wrote: >Is there documentation on this _ thing?No, you can use anything. It is just helpful for the programmer and has no special meaning to WebCat. Name it sue.Date if you like. I recommend to use a prefix only, not a suffix to mark your fields and variables. This is easier to handle. If you submit a form with WebCat ALL variables and fields go to the following page. You can check this with [formvariables]. If you have your special prefix, it is easy to find out wether a variable is a form field or not. >Is there a list of reserved words?Yes for variables: all commands of WebCat ;-) (a form field is a variable too, once the form got submitted) But instead comparing all self-invented name against the list of commands, we simply add something to the name - to avoid conflicts.Generally: if you have your own unique names for fields and variables, you are on the safe side. For example v.MyName for a variable and f.MyName for a field will let you easily find out which kind of variable you are dealing with, and they get never confused with WebCat-commands.To see what we are talking about, set up a simple page with a form like this:
[date]>
And on the page response.tpl you write: [formvariables] [name]=[value]
[/formvariables]Then fill in the fields and submit the form: response.tpl will list all variables it got from the previous page, line by line. Now you can imagine that it is quite easy to find out which variables are user-entered fields and do some action on them. Peter__________________________________________ Peter Ostry - po@ostry.com - www.ostry.com Ostry & Partner - Ostry Internet Solutions Auhofstrasse 29 A-1130 Vienna Austria fon ++43-1-8777454 fax ++43-1-8777454-21 Peter Ostry

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:

Multiple cart additions (1997) Emailer setup (1997) Foreign Language [DATE] formats (2004) Mac 3.0.5b11 PI -- template cache and aliases (1999) Nav. 4 probs with cart - Serious problem (1997) [WebDNA] [AddFields] Restrictions (2008) thankyou.tmpl (1997) RequiredFields template (1997) Showif = stumped? (2001) [Fwd: Rotating Banners ... (was LinkExchange)] (1997) insecure client not shown (1998) problems with 2 tags (1997) Listserver problem (1997) WebCat2b15MacPlugin - showing [math] (1997) Problem during evaluation of WebCatalog (1998) Need help... (1997) PCS Frames (1997) Where is f2? (1997) Constructive criticism (2000) New Mac Public Beta Available (1997)