Re: SHOWIF/HIDEIF empty fields
This WebDNA talk-list message is from 2005
It keeps the original formatting.
numero = 61906
interpreted = N
texte = Kenneth Grome wrote:> First you should know that I always name my form fields with the exact > same names as the fields in my database, because this simplifies TONS of > webdna coding -- not just the stuff I will show you here. After you > understand this requirement, you will also see how and why my technique > works so well.> > First I create a bunch of insecure text variables and set their values > to [blank] like this:> > [listfields db=xxx.db]> [text secure=f][fieldname]=[/text]> [/listfields]Ahh, your probably one of those that cause me great frustration when I haveto edit someone elses code and there is a bunch of alike named varialbes...not to mention the use of reserved variable names (but thats anotherstory) ;-)Kenneth, you can do the same things you are talking about, yet at thesame time, keeping the names different.[listfields db=xxx.db] [text secure=f]T_[fieldname]=[/text][/listfields]The "T_" is just a way to tell me its a Text Variable... usewhatever naming convections you like...I've used a few over the years but something like:T_ = text varialbeF_ = Form VariableM_ = Math VariableFor databases, I usually use the first character or first two charactersof the database file name in their field names... (except for the webDNAproprietary databases "products etc").So if the database is Names..N_ID, N_NAME, etc...Then its just a matter of using getchars within formvariables etc..to get to what you want.Naming convections (and easy to read code) are at the very top of list in importancein my opinion. They, along with good comments and code indentation, will makefor a less stressful editing experience for you... not to mention ifothers end up editing your code!DonovanP.S. I would like to remind everyone that my cat now makes it possible to getyour coding done at an amazing rate of $3.00/hour! A feline furry of almostfree code! feel it!-- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE Eucalyptus Design <-Web Development (specializing in eCommerce), -> <- Graphic Design, Custom Tags and Labels -> ADDRESS:> Donovan Brooke DBA Eucalyptus Design N2862 Summerville Park Rd. Lodi, WI 53555 PH:> 1.608.592.3567 Web:> http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Kenneth Grome wrote:> First you should know that I always name my form fields with the exact > same names as the fields in my database, because this simplifies TONS of > webdna coding -- not just the stuff I will show you here. After you > understand this requirement, you will also see how and why my technique > works so well.> > First I create a bunch of insecure text variables and set their values > to [blank] like this:> > [listfields db=xxx.db]> [text secure=f][fieldname]=[/text]> [/listfields]Ahh, your probably one of those that cause me great frustration when I haveto edit someone elses code and there is a bunch of alike named varialbes...not to mention the use of reserved variable names (but thats anotherstory) ;-)Kenneth, you can do the same things you are talking about, yet at thesame time, keeping the names different.[listfields db=xxx.db] [text secure=f]T_[fieldname]=[/text][/listfields]The "T_" is just a way to tell me its a Text Variable... usewhatever naming convections you like...I've used a few over the years but something like:T_ = text varialbeF_ = Form VariableM_ = Math VariableFor databases, I usually use the first character or first two charactersof the database file name in their field names... (except for the webDNAproprietary databases "products etc").So if the database is Names..N_ID, N_NAME, etc...Then its just a matter of using getchars within formvariables etc..to get to what you want.Naming convections (and easy to read code) are at the very top of list in importancein my opinion. They, along with good comments and code indentation, will makefor a less stressful editing experience for you... not to mention ifothers end up editing your code!DonovanP.S. I would like to remind everyone that my cat now makes it possible to getyour coding done at an amazing rate of $3.00/hour! A feline furry of almostfree code! feel it!-- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE Eucalyptus Design <-Web Development (specializing in eCommerce), -> <- Graphic Design, Custom Tags and Labels -> ADDRESS:> Donovan Brooke DBA Eucalyptus Design N2862 Summerville Park Rd. Lodi, WI 53555 PH:> 1.608.592.3567 Web:> http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Donovan Brooke
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:
b18 problem on NT 4.0 (1997)
OT: How to find out who owns an IP address (2001)
One other big addition... (1997)
[WriteFile] problems (1997)
AW: AW: Credit card processing - UK (1997)
Multiple Ad databases? (1997)
emailer (1997)
Accepting credit cards (1997)
(1997)
Sherlock plug-in? (2000)
3.05b12 (1999)
listfiles-looking for slick solution (1997)
The code, one more time. (2003)
PCS Frames (1997)
Fun with Dates - finally resolved but.... (1997)
Searching multiple fields (1997)
Showif, Hideif reverse logic ? (1997)
Emailer and encryption (1997)
[OT] OSX (unix) favorite text editor. (2002)
Intermitent problem using [referrer] (1997)