fair-rose
fair-rose2y ago

Intercept data for SaveButton on Modal

Hi. I'm really struggling to figure this out and it feels like it should be simple. I have a modal using the useModalForm hook and that's working fine, when it hit the save button it makes a request using the fields on the dialog. So far so good. Now I want to be able to manipulate some of the data before it gets sent to the API POST. Is there a simple way to do this? Thanks.
2 Replies
Omer
Omer2y ago
Hey @jn 👋, Thank you for contacting us. I hope this link can be helpful for you 🚀 https://refine.dev/docs/faq/#how-can-i-change-the-form-data-before-submitting-it-to-the-api
FAQ | refine
How can I change the form data before submitting it to the API?
fair-rose
fair-rose2y ago
Perfect. Thanks a lot.