Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
This little plugin helps to declare complex form logic, like 'show this <input> when user select this option'. Yes! In declarative style.
branch: master

fix live()

latest commit 77578ef1cb
Artem Suschev authored
Failed to load latest commit information.
examples fix live()
tests fix live()
.gitignore add Bower support
Gruntfile.js added support for jQuery 1.7+
README New actions, fixed bugs, performance upgrades added support for jQuery 1.7+ added support for jQuery 1.7+
bower.json add Bower support
jquery.grewform.js fix live()
jquery.grewform.min.js fix live() fix live() add package.json, add Grunt with minification task
license.txt Added: license info


`$('form selector').grewform({
    //Selectors are CSS/jQuery compatible. You can select inputs by values setted runtime: 'input[value=foo]'
    'rule_selector' or 'rule_selector_1 AND rule_selector_2]:
        //all actions are optional and rolls back automatically
        show:'elements_selector',   //showing elements (slideDown; slideUp on rollback)
        hide:'elements_selector',   //hiding elements (slideUp; slideDown on rollback)
        disable:'elements selecotr' //adding disabled="disabled" to attributes (remove on rollback)
        enable:'elements selecotr'  //removing disabled from attributes (adding on rollback)
        check:'elements selecotr'   //adding disabled="checked" to attributes (remove on rollback)
        uncheck:'elements selecotr' //removing "checked" from attributes (adding on rollback)
        set_value: { //setting value (<input> and <select> are supported, setting "selected" for <option> matched by value; restoring values on rollback)
        set_html: { //setting html (restoring html on rollback)
        add_options: {          //for adding options to selects
            '<select> selector':{
            '<select> selector': function   //should return obj formatted like described above
        custom: {       //for custom actions
            match:function,     //will be called when rule selector matches at least one element
            unmatch:function,   //will be called on rollback


$().grewform.reset(); // reset all rules (i.e. turn off)
$().grewform.runRules(); //manualy run rules


jQuery 1.7 or more

Check out demos

More help in article(RUS)

Something went wrong with that request. Please try again.