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:
WebDNA Verison 4.5 will Not Restart! This SUCKS! (2002)
Interfacing WebMerchant to www.fedex.com (1997)
webcatalog and webmerchant 2.1 (1998)
Problems setting MIME Headers (1998)
PROBLEM (1997)
[WebDNA] Authorize working connection... (2020)
{middle} and variables (2002)
Mac Vs WindowsNT (1997)
random in arizona (2003)
New: [WebDNA] Help with ReplaceFoundItems (2009)
How many Databases can I open? (2003)
WebCat2b12--[searchstring] bug (1997)
WC Database Format (1997)
Re:quit command on NT (1997)
Emailing html (1998)
Help name our technology! (1997)
problems with 2 tags (1997)
Sku numbers (1997)
Just Testing (1997)
Authenticate (1997)