Re: Dealing with Unchecked Checkboxes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




how about a default value...so if you use a CHECKBOX_FIELD1 ENUM('Y', 'N')
DEFAULT N type of definition, then if box is not checked, then it will
deault to N otherwise a Y will override the default.

just a thought....dont' know if it will work for you or not...
Jeff


                                                                                                                    
                    Brent Baisley                                                                                   
                    <brent@landove       To:     "Graeme McLaren" <mickel@ntlworld.com>                             
                    r.com>               cc:     <php-db@lists.php.net>                                             
                                         Subject:     Re:  Dealing with Unchecked Checkboxes                
                    10/28/2002                                                                                      
                    10:49 AM                                                                                        
                                                                                                                    
                                                                                                                    




If you want to have an answer for each item, you should use yes/no radio
buttons. With checkboxes you only get "yes" answer, as you are aware.
The assumption is that you could care less about "no" answers since you
are only interested in the "yes" set.

Checkboxes "reveal" yes answers, radio buttons can "reveal" yes or no
(or perhaps no answer if there is no default).

If you want to stick with checkboxes, then I would have a hidden field
for each checkbox you have. The hidden field could then be set with a
"yes" or "no" value via javascript and an onChange event capture.


On Saturday, October 26, 2002, at 05:02 PM, Graeme McLaren wrote:

> Hey all, I'm trying to get my head around checkboxes.  I can insert
> "checked" checkboxes into a DB no problem but I get an error when the
> checkboxes are unchecked.
--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux