Skip to content

wbotelhos/populaty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jQuery Populaty - A Form Populator - wbotelhos.com/populaty

jQuery Populaty is a plugin to populate form from a JSON.

Version

@version        0.1.2
@since          2013-05-08
@author         Washington Botelho
@documentation  wbotelhos.com/populaty
@twitter        twitter.com/wbotelhos

Required Files

  • jquery.populaty.js

Options

checkable  : ['checkbox', 'radio']             // Checkable fields.
exclude    : ':submit, :reset, :button'        // Field to be excluded from includeds.
include    : ':input'                          // Fields to be included on population.
json       : undefined                         // JSON data to populate the fields.
reset      : true                              // Reset or not the form before populate.
selectable : ['select-one', 'select-multiple'] // Selectable fields.
typeful    : [                                 // Typeful fields.
               'color',
               'date',
               'datetime',
               'datetime-local',
               'email',
               'hidden',
               'month',
               'number',
               'password',
               'range',
               'search',
               'tel',
               'text',
               'textarea',
               'time',
               'url',
               'week'
             ]

Usage

<form>
  <input name="number" />
</form>
$('form').populaty({ json: { number: 1 } });

Licence

The MIT License

Donate

You can do it via PayPal. Thanks! (: