|
Re: [Checked]: msg#00536web.interchange.users
On Thu, Jun 14, 2001 at 12:49:33AM +0200, Stefan Hornburg (Racke) wrote: > Victor Nolton <ven@xxxxxxxxxxxxx> writes: > > > I have 9 <input type="checkbox">'s > > By default none are checked. So far so good. > > if the user clicks it and submits it, it is fine, if there is a error > > the page is displayed and they are given the errors of what they > > forgot to fill out. boxes are still checked appropriately. > > > > IF they unclick one of the 9 boxes (which aren't required) and they > > submit if the page is redrawn (cause of errors) the boxes are checked > > again. > > > > Checked the docs used some examples. no luck. I just need it so that > > if they uncheck a box it stays unchecked. > > > > Anyone have any snippets of code? > > checked reference > > http://interchange.redhat.com/cgi-bin/ic/dev/ictags_14.html > > This is somewhat difficult because only checked boxes are passed > by CGI, so the value isn't reset. My formel tag should handle > this appropriately. As long as your profile looks for the values specifically this is not really a problem. In other words from a possible selection of CHECKBOXes A-Z, if you already have checked A,B,C,M,Q and you get back B,C,Q,S then that is fine and long as the profile knows how to rebuild the value. We typically keep it as an array or delimited string, not as separate values; that probably makes it easier. -- There is another brute force way. You can set a second HIDDEN VALUE=0 to unset the CHECKBOX. If the first one is not checked (and therefore not sent) your hidden value will be found. If it is checked, then the CHECKED value will be found. You want to =~s/\000.*//; the value. This way gets into problems with if($value) because it will exist when you might not expect it. cfm -- Christopher F. Miller, Publisher cfm@xxxxxxxxx MaineStreet Communications, Inc 208 Portland Road, Gray, ME 04039 1.207.657.5078 http://www.maine.com/ Content management, electronic commerce, internet integration, Debian linux |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [Checked]: 00536, Dan B |
|---|---|
| Next by Date: | Re: GST Calculation: 00536, Brett Hooker |
| Previous by Thread: | Re: [Checked]i: 00536, Stefan Hornburg (Racke) |
| Next by Thread: | Re: [Checked]: 00536, Mark Johnson |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |