val

.val()

Return a json object with the differents inputs (key/value) contained in the form

<form id="f1"> <input type="text" name="t1" /> <label><input type="checkbox" name="c1" value="456" checked="checked" />c1</label> <label><input type="checkbox" name="c2" value="789" />c2</label> <label></label><input type="radio" name="r1" value="1">1</label> <label></label><input type="radio" name="r1" value="2" checked="checked">2</label> <label></label><input type="radio" name="r1" value="3">3</label> <textarea name="text1"></textarea> <select name="s1"><option value="1">1</option><option value="2" selected="selected">2</option><option value="3">3</option></select> </form> <script> var f1 = qsi("f1"); var values = f1.val(); // values= {t1:"",c1:"456",r1:"2",text1:"",s1:"2"} </script>

setInputs

.setInputs(jsonObject)

jsonObject

Initialize the inputs of the form with (key/value) contains in the parameter

<form id="f1"> <input type="text" name="t1" /> <label><input type="checkbox" name="c1" value="456" />c1</label> <label><input type="checkbox" name="c2" value="789" />c2</label> <label></label><input type="radio" name="r1" value="1">1</label> <label></label><input type="radio" name="r1" value="2">2</label> <label></label><input type="radio" name="r1" value="3">3</label> <textarea name="text1"></textarea> <select name="s1"><option value="1">1</option><option value="2">2</option><option value="3">3</option></select> <select name="s2"><option value="1">1</option><option value="2">2</option><option value="3">3</option></select> </form> <script> var f1 = qsi("f1"); f1.setInputs({ t1: "toto", c1: "123", c2: "654", r1: "2", text1: "bla", s1: "2", s2: "3" }); </script>

setNoChanges

.setNoChanges()

Indicate that all inputs elements in the form are not modified

isModified

.isModified()

Return true if the form contains at least one input modified