Ajax Submission:


By default all forms are submitted via ajax. If you don't want your forms to be submitted via ajax, you need to put an extra attribute in your form tag.

  

<form class="form-class" id="form-id" method="post" action="/my-action" data-submit="noAjax">
<!-- Form Data -->
</form>

  

The attribute "data-submit"="noAjax" make sure that form is not submit via ajax. If this attribute is not available then default form submission method is ajax. Note that id attribute in the form is mandatory to submit it via ajax.


Preserve form input during Ajax Submission:


When a form is submitted via ajax, by default form input fields are reset. If you want to preserve form input, you need to put an extra attribute in your form tag.

  

<form class="form-class" id="form-id" method="post" action="/my-action" data-no-form-clear="1">
<!-- Form Data -->
</form>

  

The attribute "data-no-form-clear"="1" make sure that form input don't get reset. If this attribute is not available then by default form data will get reset. Note that id attribute in the form is mandatory to submit it via ajax.


Covert default checkbox & radio button into Fancy checkbox & radio input:


Use class 'icheck' to make any checkbox or radio button into fancy checkbox & radio input. 

Default checkbox

icheck checkbox 


<input type="checkbox class="icheck" name="checkbox_name"> My Checkbox

 

Covert default checkbox into switch input:


Use class 'switch-input' to make any checkbox into switch input.

Default checkbox

Switch Input 

 

<input type="checkbox class="switch-input" name="checkbox_name"> My Switch Input