Updating checkboxes made easy !!!

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 18189
interpreted = N
texte = I have just discovered a way of updating checkbox fields in a database with only one page ...Let say you have the following database : ( choice1 and choice2 are checkboxes in your input form) ------sample.db----- sku choice1 choice2 1 on --------------------If you want to update the content of the checkboxes, usually you have a first page containingChoice 1 :

Choice 2: and in the following page you have to check for the value entered to update the database with something like that in a replace context[showif [choice1]=on]&choice1=on[/showif][showif [choice1]!on]&choice1=[/showif][showif >[choice2]=on]&choice2=on[/showif][showif [choice2]!on]&choice2=[/showif]Which is not really developper friendly, especially if you want to update a lot of checkboxes ....Now you can update the checkbow from WITHIN the form :Choice 1 :

Choice 2: Try it for yoursel with the sample database sample.db and the following page wich auto display itself after you update it (you can edit sample.db after changing the checkbox to see that it has been updated)----- update.tmpl ----- update checkbox

Update me !

[search db=update.db&eqskudata=1] [founditems]
Choice 1 :

Choice 2:

[/founditems] ----------Sorry if everybody already knew that but I found this trick very useful.Enjoy,laurent--- Laurent Pladys LXir L a u r e n t P l a d y s ‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ L X i r _____________________________________________ 1 5 5 r u e d e P i c p u s 7 5 0 1 2 P a r i s F r a n c e _____________________________________________ +33 (0)1 44 68 80 60 (tel) +33 (0)1 44 68 80 61 (fax) _____________________________________________ w w w . L X i r . n e t l t p l a d y s @ L X i r . n e t Associated Messages, from the most recent to the oldest:

    
  1. Re: Updating checkboxes made easy !!! (Laurent Pladys 1998)
  2. Re: Updating checkboxes made easy !!! (Dave MacLeay 1998)
  3. Re: Updating checkboxes made easy !!! (Laurent Pladys 1998)
  4. Re: Updating checkboxes made easy !!! (Laurent Pladys 1998)
  5. Updating checkboxes made easy !!! (Laurent Pladys 1998)
  6. Re: Updating checkboxes made easy !!! (Dave MacLeay 1998)
  7. Re: Updating checkboxes made easy !!! (Bob Minor 1998)
I have just discovered a way of updating checkbox fields in a database with only one page ...Let say you have the following database : ( choice1 and choice2 are checkboxes in your input form) ------sample.db----- sku choice1 choice2 1 on --------------------If you want to update the content of the checkboxes, usually you have a first page containingChoice 1 :

Choice 2: and in the following page you have to check for the value entered to update the database with something like that in a replace context[showif [choice1]=on]&choice1=on[/showif][showif [choice1]!on]&choice1=[/showif][showif >[choice2]=on]&choice2=on[/showif][showif [choice2]!on]&choice2=[/showif]Which is not really developper friendly, especially if you want to update a lot of checkboxes ....Now you can update the checkbow from WITHIN the form :Choice 1 :

Choice 2: Try it for yoursel with the sample database sample.db and the following page wich auto display itself after you update it (you can edit sample.db after changing the checkbox to see that it has been updated)----- update.tmpl ----- update checkbox

Update me !

[search db=update.db&eqskudata=1] [founditems]
Choice 1 :

Choice 2:

[/founditems] ----------Sorry if everybody already knew that but I found this trick very useful.Enjoy,laurent--- Laurent Pladys LXir L a u r e n t P l a d y s ‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ L X i r _____________________________________________ 1 5 5 r u e d e P i c p u s 7 5 0 1 2 P a r i s F r a n c e _____________________________________________ +33 (0)1 44 68 80 60 (tel) +33 (0)1 44 68 80 61 (fax) _____________________________________________ w w w . L X i r . n e t l t p l a d y s @ L X i r . n e t Laurent Pladys

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:

REDIRECT MULTIPLE RESULTS (2000) Summing fields (1997) PROBLEM WITH TALK LIST (2000) Two submit buttons ? (1997) Shell traceroute (2001) [WriteFile] problems (1997) Rollovers (1999) Search multiple fields (1997) Changing price for a SLU based on options (size, etc.) (1997) Signup form db weirdness (2006) Windows version Trouble Shooting (2007) Question re: FlushDatabases (1997) [WebDNA] Problem Retrieving data out of MySQL (2013) Thanks Grant (1997) Errata: WCS Newbie question (1997) [WebDNA] shopping sites and the "old commerce tags" (2012) Random sort is not random at all..... (2000) relational db question (2002) [CART] (1997) New WebCatalog site (1997)