dstreet / dependsOn

a jQuery plugin for handling form field dependencies
http://dstreet.github.com/dependsOn
MIT License
105 stars 33 forks source link

enhancement suggestion #20

Open quasiperfect opened 9 years ago

quasiperfect commented 9 years ago

hi

great plugin and i see from the road map will be even better

i have no javascript background so i'm sorry if this is a stupid idea

would be great if a developer could somehow integrate this with a cms, etc without the need to write any specific javascript

i will try to make some sense

most applications have some kind of form generator / builder (visual or not) and use ajax to do some/all tasks related to forms

so the plugin could watch for the creation of any form elements based on a class/selector and autobuild itself based on rules defined using data attributes

something like

$('.dependson').dependsOn({default options:here});
<input id="a" name="a"></input>
<input class="dependson" data-depends-on-parents ="json here" data-depends-on-qualifiers="json here" data-depends-on-options="json here" id="b" name="b"></input>

now sure how hard or feasible would be to add this (i have no javascript experience so don't know limitations and problems)

best regards

EcoFreak commented 8 years ago

+1