Fired from the form when ajaxMode
is enabled. This event is to be used for submitting ajax style forms. It’s important to use this event to process the sending of your form rather than the native submit
event.
field.addEventListener('nb:submit', function(e) {
// Get the ID for this field
var id = e.detail.id;
// Get error message
var error = e.detail.error;
// Get result object
var result = e.detail.result;
});