Support » Plugin: Gravity Forms Data Persistence Add-On » How does it handle required fields?

Viewing 1 replies (of 1 total)
  • Just to let others know how I dealt with this. If you have a field marked as “required” you can’t save the form at all (or move between pages in a multi-page form) so I removed the “required” setting for all fields except those I want to force them to fill out the first time they work with the form.

    For ALL fields I want to be required, I added a custom CSS class (advanced tab on each field in Gravity Forms) and used custom css to show the user which fields were ultimately going to be required.

    Each time the user saves the form, I have a custom function run using…

    add_action('gform_after_submission', 'check_reqd_status', 10, 2);

    where “check_reqd_status” loops through all the form fields, checks for that custom css setting, checks to see if that entry is still blank, and provides the user with a list of all the required fields that they still haven’t filled in.

    I could go further than this and have a field that they’d check off when they think they are really done and have that trigger the notifications but for this specific application they are working closely with a person so I don’t need to do that.

Viewing 1 replies (of 1 total)
  • The topic ‘How does it handle required fields?’ is closed to new replies.