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 nospecial meaning to WebCat. Name it sue.Date if you like. I recommend touse a prefix only, not a suffix to mark your fields and variables. Thisis easier to handle.If you submit a form with WebCat ALL variables and fields go to thefollowing page. You can check this with [formvariables]. If you have yourspecial prefix, it is easy to find out wether a variable is a form field ornot.>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, youare on the safe side. For example v.MyName for a variable and f.MyNamefor a field will let you easily find out which kind of variable you aredealing 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 allvariables it got from the previous page, line by line. Now you can imaginethat it is quite easy to find out which variables are user-entered fieldsand do some action on them.Peter__________________________________________Peter Ostry - po@ostry.com - www.ostry.comOstry & Partner - Ostry Internet SolutionsAuhofstrasse 29 A-1130 Vienna Austriafon ++43-1-8777454 fax ++43-1-8777454-21
Associated Messages, from the most recent to the oldest:
>>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 nospecial meaning to WebCat. Name it sue.Date if you like. I recommend touse a prefix only, not a suffix to mark your fields and variables. Thisis easier to handle.If you submit a form with WebCat ALL variables and fields go to thefollowing page. You can check this with
[formvariables]. If you have yourspecial prefix, it is easy to find out wether a variable is a form field ornot.>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, youare on the safe side. For example v.MyName for a variable and f.MyNamefor a field will let you easily find out which kind of variable you aredealing 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 allvariables it got from the previous page, line by line. Now you can imaginethat it is quite easy to find out which variables are user-entered fieldsand do some action on them.Peter__________________________________________Peter Ostry - po@ostry.com - www.ostry.comOstry & Partner - Ostry Internet SolutionsAuhofstrasse 29 A-1130 Vienna Austriafon ++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)