When you create an input form using User Input elements, you can add customized success and error messages that are displayed only when a user tries to submit data to a collection. For any element that allows you to add a link (e.g. a button), you can automatically add success and error messages to your form in the Connect panel of the element.
What if you want to use code to trigger form submission based on some other user action besides clicking an element that has a link? For example, you may want a radio button selection to trigger the submit.
As long as you connect the input elements to the same dataset as the triggering element and use any of the dataset APIs that trigger a save, the submit messages will be displayed.
Note: You can only add form submit messages if your connected dataset is set to either Write-only or Read & Write.
Tip: Because success and failure messages never appear together, you can position one text element to completely overlap another on your page so the messages take up less space. Only the relevant message is displayed when a user attempts to submit data.