gburgose / jquery-formulator

jQuery forms

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jQuery Formulator

Installation

Dependencies

NPM

npm install jquery-formulator --save-dev

Install plugin and all dependencies

npm install jquery-formulator jquery-validation@1.16.0 jquery-form@4.2.0 jquery.rut@1.1.2 sweetalert@1.1.3 --save-dev

Webpack

require('jquery-formulator');

jQuery

$(document).ready(function(){
  $('form').formulator();
});

HTML

Validation

You must add the class .form-validate

<form action="" class="form-validate">
	...
	<input type="text" name="firstname">
</form>

Add this to show form errors

<div class="form-errors"></div>
Ajax

You must add the class .form-ajax

<form action="" class="form-ajax">
	...
	<input type="text" name="firstname">
</form>
Both

Example with both classes

<form action="" class="form-ajax form-validate">
	...
	<input type="text" name="firstname">
</form>

About

jQuery forms


Languages

Language:CSS 52.8%Language:JavaScript 46.5%Language:PHP 0.6%