maxatwork / form2js

Javascript library for collecting form data
http://maxatwork.github.com/form2js/
MIT License
640 stars 137 forks source link

Fix so disabled controls are totally ignored from built up object model #37

Open mcintyre321 opened 12 years ago

mcintyre321 commented 12 years ago

...put values, so shouldn't be included in results

https://github.com/maxatwork/form2js/issues/36

mcintyre321 commented 12 years ago

Given a form containing

<input type="hidden" name="x" value="hello" />
<input type="hidden" name="x" value="hello" disabled="disabled" />

form2js will currently return a null value for x - disabled controls should be totally ignored and instead form2js should return {x:"hello"}

lookfirst commented 12 years ago

Nice fix. I checked this into my fork.