How to make an edit form to handle 2+ models

I have this user model with an associated profile model (1:1 relationship) I want to make an edit form to update the both models in the same page. I'm not sure what's the recommended way of doing it. Can you point me where I can find a reference for that use case? Thank you for the great work! BTW
1 Reply
Omer
Omer2y ago
Hey @chuck 👋, Thank you for contacting us! An option might be to override useForm's onSubmit (https://refine.dev/docs/faq/#how-can-i-change-the-form-data-before-submitting-it-to-the-api ). So you can use data hooks to update two resources ⚡️ https://refine.dev/docs/api-reference/core/hooks/data/useUpdate/