Form Success Static Event Example. In this example onsuccess="lastmessage()"
is calling the JS function when the form has been submitted successfully.
dmx-on:success
is a Dynamic Event evaluated by Wappler, whereas onsuccess
is a Static Event used to call any JS function.
You can check various dynamic and static events that are available to use if you go to the form properties or button properties under App Structure.
<form class="p-2" is="dmx-serverconnect-form" id="test_form" method="post" action="/api/test" dmx-generator="bootstrap5" dmx-form-type="horizontal" dmx-on:success="notifies1.success('The form has been successfully submitted!')" onsuccess="lastmessage()">
</form>
Button Click Static Event Example. In this example onsuccess="lastmessage()"
is calling the JS function when the button is clicked.
<button class="btn btn-sm btn-outline-primary w-100" dmx-on:click="test_form.reset(true)" onclick="lastmessage()">
</button>