Title: Validate fields despite hidden fields
Last modified: February 13, 2020

---

# Validate fields despite hidden fields

 *  Resolved [marius1989](https://wordpress.org/support/users/marius1989/)
 * (@marius1989)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/validate-fields-despite-hidden-fields/)
 * 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 6 years, 3 months ago by [marius1989](https://wordpress.org/support/users/marius1989/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/validate-fields-despite-hidden-fields/#post-12433281)
 * 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 6 years, 3 months ago by [Jules Colle](https://wordpress.org/support/users/jules-colle/).

Viewing 1 replies (of 1 total)

The topic ‘Validate fields despite hidden fields’ is closed to new replies.

 * ![](https://ps.w.org/cf7-conditional-fields/assets/icon-256x256.png?rev=2072595)
 * [Conditional Fields for Contact Form 7](https://wordpress.org/plugins/cf7-conditional-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cf7-conditional-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cf7-conditional-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/cf7-conditional-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cf7-conditional-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cf7-conditional-fields/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/validate-fields-despite-hidden-fields/#post-12433281)
 * Status: resolved