Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable form validation and capture form values for save draft functionality #1488

Open
adityapatil9191 opened this issue Oct 8, 2024 · 1 comment

Comments

@adityapatil9191
Copy link

adityapatil9191 commented Oct 8, 2024

Scope: <DESCRIBE SCOPE OF THIS ISSUE, i.e.: PF4 mapper, Form renderer>
MUI Form renderer

Description
I want to develop a functionality called save as draft which should disable form validation on submission of the form and capture the form values entered by the user.
I checked the documentation but I did not find any solution to this.

Schema

This can be done with any schema available.

<If it's possible, please provide a schema which reproduces the issue>

@Hyperkid123
Copy link
Member

Hyperkid123 commented Oct 11, 2024

@adityapatil9191 you can use the form api in a custom element (or develop your own form buttons) in your form which will do this for you. You can either pause the validation or just grab the form values directly from the state. Depends on your need. You can use the useFormApi to get the state.

https://www.data-driven-forms.org/hooks/use-form-api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants