Conditional fields required, how?

Home Forums Quform WordPress Conditional fields required, how?

This topic is: resolved
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #25495
    andreamarucci
    Participant

    Hello, I’ve some fields that show based on a user choice from a popup menu and I’d like to make these two required in one case or another but I don’t know how the required works.

    I’m asking the user how he want to be contacted, if by phone or by email. If he choose phone the form show the field for the phone number and in the other case the form show the field for the email.

    I’d like that whatever the user choose, he has to fill the corresponding field.

    Can I make both the field required or there’s another way?

    #25499
    katw
    Participant

    Hi, I did the same thing in my form. But I used checkboxes for “contact by” choice.

    Add an email field and a phone number field. Set both to REQUIRED.

    Now use the conditional logic option on each to hide/show these fields according to the users menu choice.

    I didn’t use a popup menu but the approach should be the same.

    The nice thing about the conditional logic, it handles the required and knows that if a field isn’t visible the required rule doesn’t apply.

    Hope that helps a little

    #25577
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #25590
    andreamarucci
    Participant

    Thanks for the support. I’ve done as stated and I’ll contact you if there’s another problem…

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy