Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Dec 2004
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Select either radio button or the checkboxes

    Hi experts,
    I have this form where it has one radio button and four checkboxes. Can someone help me to write a function where the form functionality is like radio buttons. If a user select the radio button, then the checkboxes should be uncheck and if the user selects any of the checkboxes then the radio button should be unselected automatically. Its more or less radio button functionality but combined with checkboxes. Users are allowed to select as much checkboxes as they want but at that time radio button must be unselected and vice-versa.

    Thanks Mac

  • #2
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Use an onclick event handler and target your form elements and use disabled=(true/false).... In the case of the checkboxes you will probably need a to use a loop and check which have been checked and set those to disabled=false.... While the single radio button could be referenced by its name....

    .....Willy

  • #3
    teh Moderatorinator
    Join Date
    Sep 2004
    Location
    USA
    Posts
    2,472
    Thanks
    4
    Thanked 40 Times in 40 Posts
    Do a forum seach for check all, or checkboxes, the same idea has be discussed before, look here this should give you some idea.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •