• Resolved Karen Turner

    (@karen-turner)


    When I set a default value for a radio button, the default value is not checked when the page is opened on my multi-page set up. I don’t think the default value eg. ‘yes’, needs to be in quotes or brackets or anything, I have tried and it still doesn’t pick up the default value. I did search for this problem and found a result 4 years ago, which you said would be fixed in your next update. I am not sure if I have somehow prevented it from working in my templates or jquery, hiding parts of the form if the value is checked, or whether radio box default values do not get checked. Please can you help me on this problem. Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author xnau webdesign

    (@xnau)

    This is working, the plugin expects the default value to match the value of one of your radio buttons. If you’re using labels, make sure the default matches the value and not the label…for instance, if you had radio buttons defined like this

    Yes::y,No::n

    you’d need to have “y” in your default field for the “yes” checkbox to show up as checked. You’re correct, quotes aren’t needed.

    Thread Starter Karen Turner

    (@karen-turner)

    Ummm, then I have a problem. I did have the value as yes,no and the default as no, so now I have changed it to value yes::yes,no::no with default no but when i go to the multi-page, neither box is checked. The same happens on each page of my multi-page form and I just can’t think how I might have broken your database! If I save the page with the box checked, all is well. BUT, for a new client, I have hidden parts of the form or pages, depending on whether the box is checked. I need the default to be not checked, ie no and everything hidden, until they click otherwise. I don’t suppose you can think of anything that could have done to disrupt how it should work?

    Plugin Author xnau webdesign

    (@xnau)

    If you have javascript on those forms (the code that hides part of your form), I suggest you check that it is not causing your problem.

    Thread Starter Karen Turner

    (@karen-turner)

    Thank you for taking the time to reply an offer a suggestion. I removed all the javascript, but that didn’t solve the problem. However, it turned out there wasn’t a problem at all!! I was checking all changes on an existing record, so modifying the record default field made no difference to the form. But, when I created a new record, all the defaults were acknowledged. Just have to be careful to get all defaults in place before going live and sending out the Private ID for a new record, as you can’t set them later.
    Thanks again for your efforts and the help you have given. I think its nearly operational and the plugin is outstanding.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Radio button default value not getting ‘checked’.’ is closed to new replies.