• Resolved Cacique

    (@carlosjavier10)


    greetings, if I have a radio button with several options only one option can be chosen, but how can I do if I have several radio buttons each one with several options and I need to validate that among all the radio buttons at least one of the options is chosen? thanks in advance for your time.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Nebu John – WPMU DEV Support

    (@wpmudevsupport14)

    Hi @carlosjavier10,

    I hope you are keeping well and thank you for reaching out to us.

    I am a bit confused about the exact requirement. Can you please elaborate on this a bit more using an example so that we can try to help you?

    We look forward to hearing back from you.

    Kind Regards,
    Nebu John

    Thread Starter Cacique

    (@carlosjavier10)

    Greetings, first of all thank you very much, well I have changed it from radio buttons to select, but it is still the same requirement, I will try to explain: this is a form that I divided (for now) in 4 steps, in the first step the user should choose the services he wants, as the user adds services, its price is added in a calculation field, that goes perfect, what I would like, is that the user can not move to the next step if he has not selected at least one service, or what is the same if his total to pay is equal to zero ( $0. 00), I tried to hide the submit form button if the calculation (total to pay field) is equal to zero (although this is in the fourth final step) but it didn’t work.

    in other words, what I need is to validate that the user chose at least one, from a set of multiple selectors, (if I have one I can tell him that it is mandatory or not, but if I have 8 I want him to be able to continue only if he chose at least one among the 8.

    https://membresiastore.com/test-page/

    in the link above is the page where I am testing it (although it is in spanish), as I said the idea is that if the user doesn’t choose a service he can’t go to the next page of the form.

    I hope you can help me! thank you very much for answering.

    Thread Starter Cacique

    (@carlosjavier10)

    I am realizing right now that … the dropdown selectors don’t work if I put the form in a popup or popup window. on the same test page is the popup button, you can verify yourself, the dropdowns do nothing! if the form is in a popup.

    I don’t know if this has already been reported, or if it is a specific problem in my installation, again thank you very much for your time.

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @carlosjavier10

    I hope you’re well today!

    Your solution with submit button visibility based on total value is the simplest one and should work just fine. I just tested it on my end and it does the trick, though you may want to make sure that correct values are set for select fields options

    – there should be an option added to each of those select fields that is set to be selected by default and that has value for calculations set to 0

    and that “Submit” button has the the visibility set to show only if value of calculation is more than 0

    – rule like: “Show this field if ANY of the following rules match: Calculation is greater than 0”

    I just tested it on my test site and it works perfectly fine, as expected, not showing “Submit” button (so not allowing submission) until some choice is made in any of the select fields – choice other than the default options (that can have a label like e.g. “not selected”).

    If it’s not working for you it may be indeed related to the popup issues. Forms should theoretically work in popups but, depending on how the popup is created/handled (code-wise), there may be some conflicts or some additional settings or tweaks needed.

    That being said, I’ve visited your test page and I see there is a form directly on page (which shows submit button all the time by default) and the other form in popup – which also shows submit button by default – but I’m not quite sure about exact form configuration.

    It would be great if we could take a look at that so would you mind exporting the form and sharing it with us?

    To do so:

    – go to “Forminator -> Forms” page and use “Export” option from the drop-down menu under the little “gear” icon next to the form in question
    – copy given code and put it at “pastebin.com” service
    – then share a link to it in your response below.

    Best regards,
    Adam

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi again @carlosjavier10

    Please note: at the time of writing about response, I wasn’t aware that you have another ticket open regarding pretty much the same issue. Since you already shared the form there, I was able to check it and respond with more details so please check my response there

    https://www.ads-software.com/support/topic/avoid-sending-the-form-if-calculations-are-0/#post-16452590

    and I think we can consider this one here as no longer relevant.

    Best regards,
    Adam

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘validate one of several radio buttons’ is closed to new replies.