Re: updating checkbox in a db

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 17659
interpreted = N
texte = >Hi, > >i am trying to create a template to edit a database with checkbox type >input. > >I tried using the following > [clim]!]checked[/showif]> CLIM > >With it I am able to check a field that was previously unchecked and the >upgrade is ok (the value is indeed checked when I look at the record), >but if I uncheck the checkbox and update the record the value of the >field is still on > >How should this be done ? On the page that follows the form page, look for this parameter in your replace context:&clim=[clim]... and replace it with this:[showif [clim]=on]&clim=on[/showif][showif [clim]!on]&clim=[/showif]This will reset the clim value in your database to nothing (a blank or null value) when the person does NOT check the checkbox, and it will set that value to on when the person DOES check the checkbox ... :)This is assuming that you are performing the database editing with a [replace] context, because you cannot use this solution if your form is replacing data via a command.Sincerely, Ken Grome 808-737-6499 WebDNA Solutions mailto:ken@webdna.net http://www.webdna.net Associated Messages, from the most recent to the oldest:

    
  1. Re: updating checkbox in a db (bob 1998)
  2. Re: updating checkbox in a db (PCS Technical Support 1998)
  3. updating checkbox in a db (Laurent Pladys 1998)
  4. Re: updating checkbox in a db (Kenneth Grome 1998)
>Hi, > >i am trying to create a template to edit a database with checkbox type >input. > >I tried using the following > [clim]!]checked[/showif]> CLIM > >With it I am able to check a field that was previously unchecked and the >upgrade is ok (the value is indeed checked when I look at the record), >but if I uncheck the checkbox and update the record the value of the >field is still on > >How should this be done ? On the page that follows the form page, look for this parameter in your replace context:&clim=[clim]... and replace it with this:[showif [clim]=on]&clim=on[/showif][showif [clim]!on]&clim=[/showif]This will reset the clim value in your database to nothing (a blank or null value) when the person does NOT check the checkbox, and it will set that value to on when the person DOES check the checkbox ... :)This is assuming that you are performing the database editing with a [replace] context, because you cannot use this solution if your form is replacing data via a command.Sincerely, Ken Grome 808-737-6499 WebDNA Solutions mailto:ken@webdna.net http://www.webdna.net Kenneth Grome

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:

Problems with date math (1997) about this server and links to who (1997) WebCat2.0 acgi vs plugin (1997) Sorting by date (1997) [WriteFile] problems (1997) 2.0 Info (1997) Printing a final order (1997) A good idea? (1998) ftp to webstar (2001) verification (correction) (2004) Changing to a windows mounted share from a Mac OS X machine (2002) Referrer or maybe another way..... (2005) [listfiles] (1998) 5.0 Pricing (2003) WebCat2b13MacPlugin - nested [xxx] contexts (1997) OSX 10.2.6/iTools 7.0/WebDNA 5.0 installation (2003) webDNA on centos (2008) OT: MSN.com no email (2003) Rhapsody? (1997) WAP (2000)