Title: Setting multiple required fields
Last modified: April 22, 2019

---

# Setting multiple required fields

 *  Resolved [willcrm](https://wordpress.org/support/users/willcrm/)
 * (@willcrm)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/setting-multiple-required-fields/)
 * Hello I have been playing around with this plugin and have it mostly worked out
   but something I would like to know is if there’s a function to apply the required
   state to all fields without having each one added individually with the required
   =”{}” function. This is just as a cleanliness concern as I have about 15 fields
   that need to be filled out and all are required but only for that form and not
   the other forms for the lead entity and I am curious if I can keep the code compact.

Viewing 1 replies (of 1 total)

 *  Plugin Author [alexacrm](https://wordpress.org/support/users/alexacrm/)
 * (@alexacrm)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/setting-multiple-required-fields/#post-11455958)
 * Hi [@willcrm](https://wordpress.org/support/users/willcrm/)
 * `required` attribute has always been as a quick workaround when online capture
   requirements are _slightly_ different from Dynamics 365/CDS. Unfortunately we
   do not have any global approach to handle your situation. I find it a bit cumbersome
   that as many as 15 fields are mandatory on one form but not on another. If the
   objective of these fields vary so much, I would consider adding required fields
   in Dynamics 365/CDS, and then use workflow/Flow to copy the values as needed.
 * Alternatively, you can add a bit of php code using WordPress actions but I doubt
   it’s going to be any cleaner or more maintainable.
 * Cheers
    George

Viewing 1 replies (of 1 total)

The topic ‘Setting multiple required fields’ is closed to new replies.

 * ![](https://ps.w.org/integration-dynamics/assets/icon-256x256.png?rev=1589904)
 * [Dynamics 365 Integration](https://wordpress.org/plugins/integration-dynamics/)
 * [Support Threads](https://wordpress.org/support/plugin/integration-dynamics/)
 * [Active Topics](https://wordpress.org/support/plugin/integration-dynamics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/integration-dynamics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/integration-dynamics/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [alexacrm](https://wordpress.org/support/users/alexacrm/)
 * Last activity: [6 years, 11 months ago](https://wordpress.org/support/topic/setting-multiple-required-fields/#post-11455958)
 * Status: resolved