using checkbox as radio button

Posted by ash34 on Stack Overflow See other posts from Stack Overflow or by ash34
Published on 2010-04-16T05:53:33Z Indexed on 2010/04/16 6:03 UTC
Read the original article Hit count: 350

Filed under:
|
|

Hi,

I am looking for a way for users to select one of the two options (strength or weakness) for a list of qualities.

for eg:

                   strength     weakness  not applicable
1. Communication 
2. Punctuality
   ...

Radio button lets me select either a strength or weakness. However, I want the user to check only those qualities that apply and if a user accidentally selects a quality there is no way to undo the selection for a radio button unless there is a third radio button called not applicable or have the user re-enter the page. I was wondering if there is a way to be able to get the flexibility of a checkbox (check / uncheck) in addition to disabling or enabling the other checkbox when one of them is checked or unchecked instead of using three radio buttons.

I don't think I have seen this behavior before so wondering if there is a more elegant way of doing this. I am open to other ideas to get the same functionality. Using a checkbox as radio button was just a thought.

thanks much.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about html