WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
[resolved] Uncheck a radio button? (4 posts)

  1. chappie
    Member
    Posted 2 months ago #

    Is there a way to code radio buttons so that they can be unchecked by clicking on them a second time?

    Sounds a bit crazy I know but I have a form which gives readers the option to select from a row of numerical (cash) values or from a row of product names and I'm trying to plan for the possibility that someone will click on a cash-value radio button and then change their mind and select from the product names instead. But as it stands, once a radio button is clicked it can only be deselected by clicking on another radio button.

    I realise I could change the radio buttons to checkboxes but my client is keen to keep the buttons.

    Thanks for any help.

    https://wordpress.org/plugins/contact-form-7/

  2. davejampole
    Member
    Posted 2 months ago #

    A select dropdown sounds more efficient from what you are saying. Sometimes a client really doesn't know the impact of what they say they want. You can't uncheck a radio button other then by checking a different radio button. If you had fifty possibilities, you would need fifth checkboxes and it would take up a LOT of space, plus wouldn't look too good. A dropdown, on the other hand, takes up no more space regardless of the number of options you give the user.

  3. chappie
    Member
    Posted 2 months ago #

    Thanks dave and I do appreciate what you're saying. I just need to explore all the options before I tell my client they can't have what they want.

    Since the default state on page refresh is to have all radio buttons unchecked, I just wondered if it was possible to force a localised refresh of just the radio buttons, or some such nonsense.

  4. davejampole
    Member
    Posted 2 months ago #

    Dissuading a client of what they think they want is no easy task. Good luck on that. You could always dummy up something to show them the options and point out the space-saving implementation of the select dropdown versus the space-wasting long list of checkboxes.

Reply

You must log in to post.

About this Plugin

About this Topic