I want to make a component that have a EditForm
and encapsulate the form and the validation inside of the component.
And I want to reuse this component anywhere in my application and submit it using any button.
How can I submit a EditForm
from a button that is outside of it?
Observation: I have searched for other answers like this one but the answer that is marked as accepted doesn't answer the question and that is why I'm making this new question.
Why you want to do this
? The reason why I want this is so I can edit an entity in multiple places of my app without having to rewrite the form everytime. And I don't want to include the submit button because in some cases the form will appear inside a modal and the submit button of that form will be the modal button – FormatEditForm
then. TheEditContext
is a Cascadind value. – CommencementOnValidSubmit
– Format