numero = 20280
interpreted = N
texte = On 10/8/98 9:29 AM, Howard Wolosky so noted...>>Good, this is the way I will go. I have one more question though. I am >>using check boxes for the options. If it is checked I will send the value >>'T', is there a way to have an 'F' sent if the box is not checked or is >>it cool to just leave the field empty in the database?>>Let's say your checkbox was called bath.>> If you are appending/replacing with a context on the next page, I>generally like to do:>>[append db=whatever.db]......&[showif>[bath]=[raw][bath][/raw]]F[/showif][hideif>[bath]=[raw][bath][/raw]][bath][/hideif]&........[/append]Since you're just sending a boolean (T/F) this could be simplified as:[append db=whatever.db]......&bath=[showif [bath]=T]T[/showif][showif [bath]!T]F[/showif]&........[/append]If you have a huge number of these (which it sounds like you do) it may be easier to give each checkbox name a unique character and use a [formvariables] to loop through them to do the append.If your checkboxes in the form were named such as:then the following would add their values (as T or F) to a database:[append db=whatever.db]......[formvariables name=_&exact=F]&[name]=[showif [value]=T]T[/showif][showif [value]!T]F[/showif][/formvariables]........[/append]Note that the way this is set up, no other form element names could contain an underscore character (or else they'd be processed in that formvariables loop as well).Rob MarquardtDesigner/Resident WireheadToast Design300 First Avenue North, Suite 150Minneapolis MN 55401612.330.9863 v612.321.9424 fwww.toastdesign.com
Associated Messages, from the most recent to the oldest:
On 10/8/98 9:29 AM, Howard Wolosky so noted...>>Good, this is the way I will go. I have one more question though. I am >>using check boxes for the options. If it is checked I will send the value >>'T', is there a way to have an 'F' sent if the box is not checked or is >>it cool to just leave the field empty in the database?>>Let's say your checkbox was called bath.>> If you are appending/replacing with a context on the next page, I>generally like to do:>>[append db=whatever.db]......&[showif>[bath]=[raw][bath][/raw]]F[/showif][hideif>[bath]=[raw][bath][/raw]][bath][/hideif]&........[/append]Since you're just sending a boolean (T/F) this could be simplified as:[append db=whatever.db]......&bath=[showif [bath]=T]T[/showif][showif [bath]!T]F[/showif]&........[/append]If you have a huge number of these (which it sounds like you do) it may be easier to give each checkbox name a unique character and use a [formvariables] to loop through them to do the append.If your checkboxes in the form were named such as:then the following would add their values (as T or F) to a database:[append db=whatever.db]......[formvariables name=_&exact=F]&[name]=[showif [value]=T]T[/showif][showif [value]!T]F[/showif][/formvariables]........[/append]Note that the way this is set up, no other form element names could contain an underscore character (or else they'd be processed in that formvariables loop as well).Rob MarquardtDesigner/Resident WireheadToast Design300 First Avenue North, Suite 150Minneapolis MN 55401612.330.9863 v612.321.9424 fwww.toastdesign.com
Rob Marquardt
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...