Title: Mandatory fields
Last modified: September 1, 2016

---

# Mandatory fields

 *  Resolved [cloudblaster](https://wordpress.org/support/users/cloudblaster/)
 * (@cloudblaster)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/mandatory-fields-4/)
 * Hi,
 * is there any way to change the mandatory status of a field depending on the contents
   of another? For example, I have a form with a text field for the user’s email
   address, plus a checkbox that allows subscribing for a newsletter. If the user
   checks the box, the email address should be mandatory. If he doesn’t, entering
   the address is not required.
 * Can this be done somehow? I can’t find anything of the sort in the help or by
   googling.
 * Thanks for any hints,
    Cloudblaster
 * [https://wordpress.org/plugins/cforms2/](https://wordpress.org/plugins/cforms2/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [bgermann](https://wordpress.org/support/users/bgermann/)
 * (@bgermann)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/mandatory-fields-4/#post-7686249)
 * It is not a built-in feature. You can do it via JavaScript or via the cformsII
   PHP API, if you have the dependent forms on two different forms of a multiform.
 *  Thread Starter [cloudblaster](https://wordpress.org/support/users/cloudblaster/)
 * (@cloudblaster)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/mandatory-fields-4/#post-7686311)
 * OK, thanks. I’ll try using JavaScript.
 * Regards, Cloudblaster

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Mandatory 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/)

 * 2 replies
 * 2 participants
 * Last reply from: [cloudblaster](https://wordpress.org/support/users/cloudblaster/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/mandatory-fields-4/#post-7686311)
 * Status: resolved