Title: Conditionally Required Fields
Last modified: January 8, 2018

---

# Conditionally Required Fields

 *  Resolved [mslovak](https://wordpress.org/support/users/mslovak/)
 * (@mslovak)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/conditionally-required-fields/)
 * This is just a question about whether or not something can be done in cformsII.
   I have a form that has fields for entering information about two people. For 
   the first person all info is required (name, email, address etc). Entering a 
   second person is optional, however, if a name is entered for the second person
   then we would want all of the other info be required. I obviously cant’t just
   make these be required fields since they are only conditionally required. I can
   think of complicated ways to do this using multiple forms (i.e. a main form and
   then separate forms for each person) but ideally I was wondering if there was
   any existing functionality that might say that field Y is required only if data
   has been entered in field X. I’m pretty sure this isn’t possible but I thought
   I would ask. I would also welcome any thoughts about work arounds. Thanks much.

Viewing 1 replies (of 1 total)

 *  Plugin Author [bgermann](https://wordpress.org/support/users/bgermann/)
 * (@bgermann)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/conditionally-required-fields/#post-9845736)
 * You are right, there is no built-in way to do that. I cannot think of a good 
   way to do it with cformsII.

Viewing 1 replies (of 1 total)

The topic ‘Conditionally Required Fields’ is closed to new replies.

 * ![](https://ps.w.org/cforms2/assets/icon-128x128.png?rev=1010031)
 * [cformsII](https://wordpress.org/plugins/cforms2/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cforms2/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cforms2/)
 * [Active Topics](https://wordpress.org/support/plugin/cforms2/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cforms2/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cforms2/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [bgermann](https://wordpress.org/support/users/bgermann/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/conditionally-required-fields/#post-9845736)
 * Status: resolved