Re: Checkboxes

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 19216
interpreted = N
texte = On 7/30/1998 9:10 am, Charles Kefauver so noted...>>It would just have to be: >> >>>[theField]=1]CHECKED[/showif]> >> >>For whatever is processing this form, if the checkbox is checked, >>theField = 1. If it's not checked, the value will be undefined, so >>theField = [theField]. You may want to filter out these undefined >>values before adding them to your database. > >That is the problem, how do I filter these undefined values during a >[REPLACE] action? This means adding an intermediate page to filter all >this garbage. There must be an easier way to do it...You wouldn't need an intermediate page, just a [showif] in your [replace] context. For example:[replace db=product.db&eqSkuData=[someSKU]]theField=[showif [theField]=1]1[/showif][/replace]And even this wouldn't be necessary for your form as shown above to check its checkboxes properly. If the checkbox hasn't been checked, the literal value [theField] will be stored in product.db so the comparison [showif [theField]=1]CHECKED[/showif] will still work as expected. Using the [showif] to remove the raw [theField] value would result in that particular field in your record containing either 1 or nothing (instead of 1 or [theField]), but from a programming standpoint, it makes no difference either way. It *would* be less confusing if WebCatalog collapsed undefined values so they'd be blanks automatically, but that's not the way the current version works ; )Rob Marquardt Designer/Resident Wirehead Toast Design300 First Avenue North, Suite 150 Minneapolis MN 55401 612.330.9863 v 612.321.9424 f www.toastdesign.com Associated Messages, from the most recent to the oldest:

    
  1. Re: [OT] Checkboxes! Javascript? ( "WebDna @ Inkblot Media" 2005)
  2. Re: [OT] Checkboxes! Javascript? ( Clint Davis 2005)
  3. Re: [OT] Checkboxes! Javascript? ( Marc Thompson 2005)
  4. Re: [OT] Checkboxes! Javascript? ( "WebDna @ Inkblot Media" 2005)
  5. Re: [OT] Checkboxes! Javascript? ( Marc Thompson 2005)
  6. [OT] Checkboxes! Javascript? ( "WebDna @ Inkblot Media" 2005)
  7. Re: JavaScript: Select All Checkboxes (Clint Davis 2001)
  8. Re: JavaScript: Select All Checkboxes (David Anderson 2001)
  9. JavaScript: Select All Checkboxes (Clint Davis 2001)
  10. Re: Fwd: checkboxes (Webmaster@4GDATA.com 2000)
  11. Re: Fwd: checkboxes (John Peacock 2000)
  12. Re: Fwd: checkboxes (Webmaster@4GDATA.com 2000)
  13. Re: Fwd: checkboxes (John Peacock 2000)
  14. Re: Fwd: checkboxes (Joseph D'Andrea 2000)
  15. Re: Fwd: checkboxes (John Peacock 2000)
  16. Fwd: checkboxes (Joseph D'Andrea 2000)
  17. Re: checkboxes (Webmaster@4GDATA.com 2000)
  18. FW: checkboxes (Webmaster@4GDATA.com 2000)
  19. Re: [checkboxes] and webcat (Joseph D'Andrea 2000)
  20. Re: [checkboxes] and webcat (Serban Constantinescu 2000)
  21. Re: [checkboxes] and webcat (Charles Kline 2000)
  22. [checkboxes] and webcat (2) (Serban Constantinescu 2000)
  23. Re: [checkboxes] and WebCat (2) (Jesse Proudman 2000)
  24. [checkboxes] and webcat (Serban Constantinescu 2000)
  25. Re: writing checkboxes to a database (The Mooseman 2000)
  26. Re: writing checkboxes to a database (Richard 2000)
  27. Re: writing checkboxes to a database (Richard 2000)
  28. Re: writing checkboxes to a database (Kenneth Grome 2000)
  29. Re: writing checkboxes to a database (Bob Minor 2000)
  30. writing checkboxes to a database (Richard 2000)
  31. Re: question about checkboxes (Bob Minor 1999)
  32. Re: question about checkboxes (Ricky Patten 1999)
  33. Re: question about checkboxes (Kenneth Grome 1999)
  34. question about checkboxes (Mike Jones 1999)
  35. Tiny Store / Checkboxes (John Hill 1998)
  36. Checkboxes and neSKUdata=[blank] (Chris W. 1998)
  37. Re: BIG PROBLEMS with Checkboxes!!! (Chris W. 1998)
  38. Re: BIG PROBLEMS with Checkboxes!!! (Chris W. 1998)
  39. BIG PROBLEMS with Checkboxes!!! (Chris W. 1998)
  40. BIG PROBLEMS with Checkboxes!!! (Chris W. 1998)
  41. Re: BIG PROBLEMS with Checkboxes!!! (Rob Marquardt 1998)
  42. Re: BIG PROBLEMS with Checkboxes!!! (Rob Marquardt 1998)
  43. Checkboxes on forms?? (Scott Szretter 1998)
  44. Re: Checkboxes on forms?? (Dave MacLeay 1998)
  45. RE: Checkboxes to add to cart... (Jay Van Vark 1998)
  46. RE: Checkboxes to add to cart... (Rob Marquardt 1998)
  47. Re: Checkboxes to add to cart... (PCS Technical Support 1998)
  48. RE: Checkboxes to add to cart... (Pat McCormick 1998)
  49. Checkboxes to add to cart... (Jim V 1998)
  50. Re: Checkboxes (Peter Ostry 1998)
  51. Re: Checkboxes (Charles Kefauver 1998)
  52. Re: Checkboxes (Peter Ostry 1998)
  53. Re: Checkboxes (Rob Marquardt 1998)
  54. Re: Checkboxes (Charles Kefauver 1998)
  55. Re: Checkboxes (Rob Marquardt 1998)
  56. Re: Checkboxes (Charles Kefauver 1998)
  57. Re: Checkboxes (Rob Marquardt 1998)
  58. Re: Checkboxes (Charles Kefauver 1998)
  59. Re: Checkboxes (Charles Kefauver 1998)
  60. Re: Checkboxes (Kenneth Grome 1998)
  61. Re: Checkboxes (Rob Marquardt 1998)
  62. Checkboxes (Charles Kefauver 1998)
  63. Re: multiple selected Checkboxes (Sue Ann Sanders 1998)
  64. Re: multiple selected Checkboxes (Peter Ostry 1998)
  65. multiple selected Checkboxes (Sue Ann Sanders 1998)
  66. Re: Updating checkboxes made easy !!! (Laurent Pladys 1998)
  67. Re: Updating checkboxes made easy !!! (Dave MacLeay 1998)
  68. Re: Updating checkboxes made easy !!! (Laurent Pladys 1998)
  69. Re: Updating checkboxes made easy !!! (Laurent Pladys 1998)
  70. Updating checkboxes made easy !!! (Laurent Pladys 1998)
  71. Re: Updating checkboxes made easy !!! (Dave MacLeay 1998)
  72. Re: Updating checkboxes made easy !!! (Bob Minor 1998)
  73. Re:Multiple appends with checkboxes (Jay Van Vark 1998)
  74. Multiple appends with checkboxes (Gil Poulsen 1998)
  75. Re: Checkboxes (dwilfong@world-wide-art.com (David Wilfong) 1997)
  76. Re: Checkboxes (Kenneth Grome 1997)
  77. Checkboxes (dwilfong@world-wide-art.com (David Wilfong) 1997)
  78. Re: possible, WebCat2.0 and checkboxes-restated (Grant Hulbert 1997)
  79. Re: possible, WebCat2.0 and checkboxes-restated (grichter@panavise.com (Gary Richter) 1997)
  80. Re: possible, WebCat2.0 and checkboxes-restated (Grant Hulbert 1997)
  81. possible, WebCat2.0 and checkboxes-restated (grichter@panavise.com (Gary Richter) 1997)
  82. Re: Is this possible, WebCat2.0 and checkboxes (Grant Hulbert 1997)
  83. Is this possible, WebCat2.0 and checkboxes (grichter@panavise.com (Gary Richter) 1997)
  84. Re: WebCat2b13 Mac plugin - [sendmail] and checkboxes (Kenneth Grome 1997)
  85. Re: WebCat2b13 Mac plugin - [sendmail] and checkboxes (Grant Hulbert 1997)
  86. Re: WebCat2b13 Mac plugin - [sendmail] and checkboxes (Kenneth Grome 1997)
  87. Re: WebCat2b13 Mac plugin - [sendmail] and checkboxes (grichter@panavise.com (Gary Richter) 1997)
  88. WebCat2b13 Mac plugin - [sendmail] and checkboxes (Kenneth Grome 1997)
On 7/30/1998 9:10 am, Charles Kefauver so noted...>>It would just have to be: >> >>>[theField]=1]CHECKED[/showif]> >> >>For whatever is processing this form, if the checkbox is checked, >>theField = 1. If it's not checked, the value will be undefined, so >>theField = [theField]. You may want to filter out these undefined >>values before adding them to your database. > >That is the problem, how do I filter these undefined values during a >[replace] action? This means adding an intermediate page to filter all >this garbage. There must be an easier way to do it...You wouldn't need an intermediate page, just a [showif] in your [replace] context. For example:[replace db=product.db&eqSkuData=[someSKU]]theField=[showif [theField]=1]1[/showif][/replace]And even this wouldn't be necessary for your form as shown above to check its checkboxes properly. If the checkbox hasn't been checked, the literal value [theField] will be stored in product.db so the comparison [showif [theField]=1]CHECKED[/showif] will still work as expected. Using the [showif] to remove the raw [theField] value would result in that particular field in your record containing either 1 or nothing (instead of 1 or [theField]), but from a programming standpoint, it makes no difference either way. It *would* be less confusing if WebCatalog collapsed undefined values so they'd be blanks automatically, but that's not the way the current version works ; )Rob Marquardt Designer/Resident Wirehead Toast Design300 First Avenue North, Suite 150 Minneapolis MN 55401 612.330.9863 v 612.321.9424 f www.toastdesign.com Rob Marquardt

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:

Forbidden CGI Error (1997) emailer (1997) [AppendFile] problem (WebCat2b13 Mac .acgi) (1997) Almost a there but..bye bye NetCloak (1997) Running 2 two WebCatalog.acgi's (1996) Re:emailer 150 (1997) Fwd: Problems with Webcatalog Plug-in (1997) date sorting and 'template (1997) unique ascending numbers (2003) Secure server question (1997) lookup command (1999) Sun doesn't have an emailer app? (2000) [WebDNA] Hmmm ... (2008) Re:2nd WebCatalog2 Feature Request (1996) international time (1997) [cart] tag (2000) problems with 2 tags shakur (1997) Setting up WebCatalog with Retail Pro data (1996) Shipping charges depending on tax rate? (1997) problems with 2 tags (1997)