Putting a form in "Review" mode

I have a use case where i am building a Gravity Form that needs a function for the user to “Submit Form for Review”. The form has a number of fields that are required. A user may fill out half of those required fields, and then realise that a supervisor needs to review the form. The workflow i’m after here is that at any point the user can tick a box for “Submit Form for Review”. Once they tick this box, any required field becomes not required, in order for the form to be able to be submitted. The form would then submit what has been inputted so far. When the “Submit Form for Review” flag is turned “off”, those fields become required again.

One way i tried to handle this was using Conditional Display, where when “Submit Form for Review=Yes”, make all required fields “hidden”, thereby removing the required setting for those fields and allowing the form to be submitted. The problem though is that by conditionally making those fields hidden, Gravity Forms does not submit any data that was inputted into those required fields that are now hidden.

It seems GravityForms does not pass through data that is in hidden fields.

I need to find a way to either conditionally make fields required / not required based on the selection of this Flag For Review field, or find a way to submit values in fields that have been conditionally hidden. There may be other ways to perform the workflow I’m after, just really need some help to get it working.

Hi Matthew. Gravity Forms will ignore data in hidden fields when the form is submitted, so that is working as designed.

However, take a look at the gform_pre_validation filter, specifically example 1:

Conditionally Required Field

The following example shows how you can conditionally require a field based on the value of another field.:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.