Alerts

Customize the Form Result Alerts (success/error) according to what you require. Set the data-alert-type to inline or notify to use the Default Alert Types. To use a Custom Alert Type (example), use data-alert-type="false". Example:

Usage

<div class="form-widget" data-alert-type="inline">
	<div class="form-result"></div>

	<form class="row" id="template-contactform" action="include/form.php" method="post">

		<div class="form-process"></div>

		...

	</form>
</div>

Extras

Using Custom Alerts

You can use HTML/CSS or jQuery to Customize the Alerts. Canvas Form uses jQuery and CSS Classes to interact with the Document about the Form Status:

CSS Classes:

The CSS Classes are added on the Document ``:

on Form Ready:

on Form Processing: (after user clicks the Submit Button)

on Form Complete: (after Form AJAX request is completed)

on Form Complete & Successful: (after Form Submission is Successful)

on Form Complete but has Errors: (is Form has Errors)

Note: Make sure that there's always a Unique ID assigned to the Form as the Form Classes above are assigned based on your Form IDs. Example:

Javascript Events

The Javascript Events are triggered only on Form Submission Success and Error only.

on Form Complete & Successful: (after Form Submission is Successful)

jQuery('#template-contactform').on( 'formSubmitSuccess', function(data){
	// Your JS Codes here
	console.log(data);
});

on Form Complete but has Errors: (is Form has Errors)

jQuery('#template-contactform').on( 'formSubmitError', function(data){
	// Your JS Codes here
	console.log(data);
});

Note: Always add the JS codes at the bottom of the Page after the js/functions.js JS File Linking.