Form submition and validation #1963
-
Hi, maybe I miss something but I followed the docs about validation and my form is not submitting. HTML
JS import { initTE({ Validation, Input }, true); With data-te-submit-btn-ref on the button "you don't have to listen on the button clicks yourself", this means also that I must give a submit callback function? If yes how? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi! You can use the Read about the You can also listen for our events that are emitted after validating components: |
Beta Was this translation helpful? Give feedback.
Hi!
You can use the
submitCallback
option where you can pass a method that is beeing called after the validation is performed. Checkout this example to see how it works:https://tailwind-elements.com/docs/standard/forms/validation/#custom-validation
Read about the
submitCallback
option on our API section:https://tailwind-elements.com/docs/standard/forms/validation/#docsTabsAPI - section options
You can also listen for our events that are emitted after validating components:
https://tailwind-elements.com/docs/standard/forms/validation/#docsTabsAPI - section events