This event is emitted when a form is submitted through Unpoly.
When the form is being validated, this event is not emitted.
Instead an up:form:validate
event is emitted.
Listeners may inspect and manipulate render options for the coming fragment update.
The code below will use a custom transition when a form submission fails:
up.on('up:form:submit', function(event) {
event.renderOptions.failTransition = 'shake'
})
The form parameters that will be send as the form's request payload.
Listeners may inspect and modify params before they are sent.
The element that caused the form submission.
This is usually a submit button or a focused field from which the user pressed Enter
.
If the element is not known, the event is emitted on the <form>
element.
An object with render options for the fragment update.
Listeners may inspect and modify these options.
Prevents the form from being submitted.