I am trying to call a function when the user clicks on the submit button inside an AutoForm from the vazco/uniforms components. I’m also using the parameter schema={schema} to validate if the form data is correct. What happens is if the form is incorrect, I didn’t find a way to trigger the function. How can I set it on the AutoForm?
Detail: I need to be just when the user clicks on the button submit of the form.
I have:
<AutoForm
showInlineError
schema={schema}
model={model}
label={false}
onSubmit={this.submitForm.bind(this)}
>
...
</AutoForm>
I know I can write:
onValidate={(modelTmp, error, callback) => {..}}
and also
modelTransform={(mode, model) => {..}}
but with this functions I don’t know if the user just clicked on the submit button, or if he is typing something on the form and it is changing the model.
Any idea how to solve it?
Thanks