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:

Bug Report, maybe (1997) Resume Catalog ? (1997) Search design (1997) Server Freeze (1998) Practice runs ? (1997) hideif [x]=1,2,3.. (2003) [url] (1997) [include ...] behavior (1997) WebCatalog NT beta 18 problem (1997) WebCat2b13 Command Reference Doc error (1997) AccountAuthorizer doesn't seem to work (1997) WebCat2: Items xx to xx shown, etc. (1997) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) Misc Stuff That Might Help (1997) nesting limits? (1998) customizing the color of user's pages (1997) Newbie Tax Question (1997) More on the email templates (1997) taxTotal (1997) search form problem.. (1997)