Hexagora Forum
Hexagora Forum
Home | Profile | Active Topics | Members | Search | FAQ
 All Forums
 Dynamic HTML Editor
 Dynamic HTML Editor
 Selecting only one checkbox

Note: You must be registered in order to post a reply.

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert Email Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
Martin1 Posted - 05 Nov 2005 : 17:42:02
Hello all,

I have a question. I have a form on my page with some checkboxes and radiobuttons.

I only want to allow the checking of one checkbox per question and the same goes for the radiobutton.
So for example I ask a question.
Are you a man:
Checkbox NO - checkbox YES

Obviously you need to choose one or the other. If you fill in YES and you change your mind (for whatever strange reason ) and you fill in NO, the checkbox that was previously filled in (the YES checkbox) needs to be cleared.

Anyone understand my question and know how to do this?

Regards,

Martin
8   L A T E S T    R E P L I E S    (Newest First)
jtarin Posted - 07 Jan 2006 : 21:44:20
Martin 1...found a javascript that will allow you to have your guest select one checkbox and one checkbox only, rather than multiple. Don't know if you can still use it but here's the link.
"Limits the number of checkboxes a user may click by deselecting the others upon selection."
http://javascript.internet.com/forms/select-one.html
Martin1 Posted - 16 Nov 2005 : 13:35:40
Wow!!!

My sister has been there and it is very nice indeed. Lucky you[2 H:)]
s.dav Posted - 16 Nov 2005 : 11:44:07
;-) I have gone here:

http://www.maldive.at/ellaidoo-i.htm
http://www.intourist-maldives.com/resorts/ellaidhoo.html

very nice ;-)
Martin1 Posted - 15 Nov 2005 : 13:24:09
Hmmmm I kinda knew that about the checkboxes but just hoped it could be done someway:-)

Anyway I have got it now so thanks for the help jtarin and Davide.

By the way how were your 10 days off? I hope you enjoyed them Davide:-)

Martin
s.dav Posted - 15 Nov 2005 : 09:18:04
Very good jtarin,
martin, you have to use the radio box using the property "name" for grouping them ;-)
jtarin Posted - 09 Nov 2005 : 06:41:39
Checkboxes have to be unchecked to clear.....radio buttons by default are similar to the old car radio buttons, you can never push two at once.Its not possible to have checkboxes act as radio buttons. They are two distinct forms.Use radio buttons for your example above. Checkboxes are for lists where more than one answer is applicable and/or desired.
Martin1 Posted - 07 Nov 2005 : 15:49:58
Hey I thought you were away for 10 days:-)

I am not totally sure what you mean. I have a form in this I have two checkboxes.
In the properties panel one has the ID Check1 and the other has the Id Check2.
I gave them each a value namely Check1 has the value yes and Check2 has the value no.

But I can still select them both.

The same issue goes for the radiobutton by the way.

What am I doing wrong?

I thought that the checkboxes/radiobuttons should have the same Id but then I get an error stating that they have the same Id and I can't preview the page.

Martin
s.dav Posted - 06 Nov 2005 : 09:46:34
For this you have to create two options and give them a unique name ex: "question1" so they will be mutually exclusive ;-)

Hexagora Forum © s.dav Go To Top Of Page
Snitz Forums 2000