Added
Display the form using the updated structure. Intended for use with
hx-input
etc. Inputs and the hx-flag-button
class. hx-input
etc. Inputs and the hx-flag-button
class. hx.validateForm(selector, options)
instead. hx.validateForm(selector, options)
instead. hx.select('#form').select('button').on('click', function (event){
event.preventDefault(); // Stops the form from submitting natively
var validObj = hx.validateForm('#form');
if(validObj.valid){
// Do something on success
}
// Do nothing if the form isn't valid (as the validateForm function will show a message)
});
hx.select('#form').select('button').on('click', function (event){
event.preventDefault(); // Stops the form from submitting natively
var validObj = hx.validateForm('#form');
if(validObj.valid){
// Do something on success
}
// Do nothing if the form isn't valid (as the validateForm function will show a message)
});