Bypassing 'Should not ne empty' validation for the 'Save Draft' button

I have a form containing several input fields with the “should not be empty” validation requirement.

However, I also want to provide users with the ability to save a draft and return to complete the form later without forcing them to fill in all the inputs immediately.

Unfortunately, when I click the “draft” button, it triggers a “not valid” error on the inputs, preventing me from saving the draft.

Is there a solution to this issue?

Thank you so much!

You can add a custom state which would be COULD IT BE EMPTY (yes/no). Then add a button which would be something like WOULD YOU LIKE TO SAVE DRAFT? When the button is clicked you should change COULD IT BE EMPTY to YES, and button SAVE DRAFT should appear. Once the state of COULD IT BE EMPTY is YES, you should set conditions to fields when the COULD IT BE EMPTY is YES, SHOULD NOT BE EMPTY should be unchecked. And when someone clicks second button SAVE DRAFT, it should work.

Thank you! I will try your suggestion and I will let you know!

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.