Re: Can [formvariables] do this?

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 35760
interpreted = N
texte = How about:[replace db=orders.db&eqORDERNAMEdata=[ordername]][formvariables name=var&exact=f][name]=[value][/formvariables][/replace]This will work as long as the variables that you want to replace have names with var in them and they have the same name in the database. you might also want to name your form variables with some convention so that you aren't trying to replace fields that don't exist in the database. Something like form.[formvariables name=form.&exact=f]check out the way that database helper uses formvariables.___Joe___ At 10:52 AM 8/4/00, Will Starck wrote: >It'd sure be great if I could do: > >[formvariables name=var1&exact=F&name=var2&exact=T&name=var3&exact=T...] > > >So I can do the following: > >[formvariables name=var1&exact=f&name=var2&exact=T&name=var3&exact=T...] >[replace >db=orders.db&eqordernamedata=[ordername]]var1=[value1]&var2=[value2]...[/rep >lace] >[/formvariables] > >Instead of > >[formvariables name=var1&exact=F] >[replace db=orders.db&eqordernamedata=[ordername]]var1=[value][/replace] >[/formvariables] > >[formvariables name=var2&exact=T] >[replace db=orders.db&eqordernamedata=[ordername]]var2=[value][/replace] >[/formvariables] > >[formvariables name=var3&exact=f] >[replace db=orders.db&eqordernamedata=[ordername]]var3=[value][/replace] >[/formvariables] > > >-- >Will Starck >Product and Technical Support >NovaDerm.com >http://www.novaderm.com >techs@novaderm.com >Toll free support line: 800-378-1740 > >> From: Peter Ostry >> Reply-To: (WebCatalog Talk) >> Date: Fri, 04 Aug 2000 17:18:22 >> To: (WebCatalog Talk) >> Subject: Re: YACBQ.....(Yet another checkbox question) >> >> on 04.08.2000 15:42, Will Starck at daprez@tigernet.net wrote: >> >>> Ummm....my question actually centered around an unchecked box not returning >>> *anything* (not even its name) to the page in question. >>> >>> So, how can one make these comparisons work, if the variable name >>>isn't even >>> returned? >> >> >> You still think this is a bug, right? >> It is pure HTML and in ancient times it *did* make sense. You could write a >> form and got a nice response on the page without any additional software. >> >> --- >> But to your question - Method 1 >> >> [showif [v_box23]^v_box23] >> empty! >> [/showif] >> >> --- >> >> Method 2 >> >> [showif [clickme]=[raw][clickme][/raw]] >> nobody clicked me :( >> [/showif] >> >> --- >> >> Method 3 >> Assuming you have 100 checkboxes, >> named v_box1 to v_box100, >> all deliver the value yes: >> >> [loop start=1&end=100] >> [text]v_box[index]=no[/text] >> [/loop] >> >> [formvariables name=v_box&exact=f] >> [text][name]=[value][/text] >> [/formvariables] >> >> ...got it? First you set all variables to no within the loop. Then some of >> them might be set to yes if a user has clicked on them. If you have many >> boxes and you really need values, this is the method of your choice. >> >> --- >> >> Peter >> >> >> ------------------------------------------------------------- >> 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://search.smithmicro.com/ > > >------------------------------------------------------------- >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://search.smithmicro.com/_________________________________________________ Joseph D'Andrea JoeDan@West21.com WEST21.com Internet services for the 21st Century http://www.west21.com/ _________________________________________________ ------------------------------------------------------------- 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://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Can [formvariables] do this? (Kenneth Grome 2000)
  2. Re: Can [formvariables] do this? (Joseph D'Andrea 2000)
  3. Can [formvariables] do this? (Will Starck 2000)
How about:[replace db=orders.db&eqORDERNAMEdata=[ordername]][formvariables name=var&exact=f][name]=[value][/formvariables][/replace]This will work as long as the variables that you want to replace have names with var in them and they have the same name in the database. you might also want to name your form variables with some convention so that you aren't trying to replace fields that don't exist in the database. Something like form.[formvariables name=form.&exact=f]check out the way that database helper uses formvariables.___Joe___ At 10:52 AM 8/4/00, Will Starck wrote: >It'd sure be great if I could do: > >[formvariables name=var1&exact=F&name=var2&exact=T&name=var3&exact=T...] > > >So I can do the following: > >[formvariables name=var1&exact=f&name=var2&exact=T&name=var3&exact=T...] >[replace >db=orders.db&eqordernamedata=[ordername]]var1=[value1]&var2=[value2]...[/rep >lace] >[/formvariables] > >Instead of > >[formvariables name=var1&exact=F] >[replace db=orders.db&eqordernamedata=[ordername]]var1=[value][/replace] >[/formvariables] > >[formvariables name=var2&exact=T] >[replace db=orders.db&eqordernamedata=[ordername]]var2=[value][/replace] >[/formvariables] > >[formvariables name=var3&exact=f] >[replace db=orders.db&eqordernamedata=[ordername]]var3=[value][/replace] >[/formvariables] > > >-- >Will Starck >Product and Technical Support >NovaDerm.com >http://www.novaderm.com >techs@novaderm.com >Toll free support line: 800-378-1740 > >> From: Peter Ostry >> Reply-To: (WebCatalog Talk) >> Date: Fri, 04 Aug 2000 17:18:22 >> To: (WebCatalog Talk) >> Subject: Re: YACBQ.....(Yet another checkbox question) >> >> on 04.08.2000 15:42, Will Starck at daprez@tigernet.net wrote: >> >>> Ummm....my question actually centered around an unchecked box not returning >>> *anything* (not even its name) to the page in question. >>> >>> So, how can one make these comparisons work, if the variable name >>>isn't even >>> returned? >> >> >> You still think this is a bug, right? >> It is pure HTML and in ancient times it *did* make sense. You could write a >> form and got a nice response on the page without any additional software. >> >> --- >> But to your question - Method 1 >> >> [showif [v_box23]^v_box23] >> empty! >> [/showif] >> >> --- >> >> Method 2 >> >> [showif [clickme]=[raw][clickme][/raw]] >> nobody clicked me :( >> [/showif] >> >> --- >> >> Method 3 >> Assuming you have 100 checkboxes, >> named v_box1 to v_box100, >> all deliver the value yes: >> >> [loop start=1&end=100] >> [text]v_box[index]=no[/text] >> [/loop] >> >> [formvariables name=v_box&exact=f] >> [text][name]=[value][/text] >> [/formvariables] >> >> ...got it? First you set all variables to no within the loop. Then some of >> them might be set to yes if a user has clicked on them. If you have many >> boxes and you really need values, this is the method of your choice. >> >> --- >> >> Peter >> >> >> ------------------------------------------------------------- >> 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://search.smithmicro.com/ > > >------------------------------------------------------------- >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://search.smithmicro.com/_________________________________________________ Joseph D'Andrea JoeDan@West21.com WEST21.com Internet services for the 21st Century http://www.west21.com/ _________________________________________________ ------------------------------------------------------------- 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://search.smithmicro.com/ Joseph D'Andrea

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:

My URL, Your URL (2002) Close Databases Crash? (1998) Calculating Age from DB fields (2003) HTML text cannot be copied to clipboard? (1999) math and european notation (1998) Upgrading old WebCat Database Files (1997) Practice runs ? (1997) SiteGuard Admin Feature ? (1997) [format 40s]text[/format] doesn't work (1997) Subject: Authenticating users without dialog box (1997) Trouble Searching (1999) Bug Report, maybe (1997) [WebDNA] WebDNA future (2010) Re:2nd WebCatalog2 Feature Request (1996) Snake Bites (1997) webcat NT (1998) truncating email part II (1997) Variables (1999) Mem per threads (1998) WebCat2b12 - nesting [tags] (1997)