• Resolved marius1989

    (@marius1989)


    Hey there.

    I know on purpose, hidden fields are not validated and I totally agree this is the way the plugin should work.
    But there are some cases where it is necessary to validate required fields despite they are hidden by conditional logic.

    Is there any way to achieve it? Like by adding a tag to the group field, like clear_on_hide?

    *Edit*
    Additional question. Are values of hidden fields submitted by email or are they ignored intentionally?

    Thanks for your help.

    • This topic was modified 5 years, 1 month ago by marius1989.
Viewing 1 replies (of 1 total)
  • Plugin Author Jules Colle

    (@jules-colle)

    No, not really. You could use CF7 filters to intercept the validation and output a custom message. But I don’t think adding this feature natively is a good idea. I mean, it would be pretty annoying to get a global error message on submit, and then you scroll up, but you don’t see any errors because the errors are inside hidden groups. I hear to thinking: “so show the groups if there is an error inside of them”.. Ok, but at what point should the group be hidden again. I don’t know, it just feels weird, and honestly I think it’s going to lead to a support nightmare once I would add an option like this.

    I’m open to your suggestions on how it should work though, but please keep in mind that I want this plugin to be easy and useful for as many people as possible.

    *edit*

    values of hidden fields should be visible in the email, but you can wrap them with conditional tags if you want to only show them if the group was visible during submission. Please check out the last section of the tutorial.

    • This reply was modified 5 years, 1 month ago by Jules Colle.
Viewing 1 replies (of 1 total)
  • The topic ‘Validate fields despite hidden fields’ is closed to new replies.