Home › Forums › Quform WordPress › Conditional fields required, how?
- This topic has 3 replies, 3 voices, and was last updated 6 years, 12 months ago by
andreamarucci.
- AuthorPosts
- May 4, 2018 at 10:56 am #25495
andreamarucci
ParticipantHello, 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?
May 5, 2018 at 2:18 am #25499katw
ParticipantHi, 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
May 8, 2018 at 5:03 pm #25577Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
May 9, 2018 at 7:53 am #25590andreamarucci
ParticipantThanks for the support. I’ve done as stated and I’ll contact you if there’s another problem…
- AuthorPosts
- You must be logged in to reply to this topic.