codeforamerica / rva-screening

Health service prescreener for sharing patient eligibility data.
http://quickscreenrva.com
BSD 3-Clause "New" or "Revised" License
11 stars 8 forks source link

adding a new many-to-one field copies validation classes as well #228

Closed mapsam closed 9 years ago

mapsam commented 9 years ago

Right now if you have an invalid input on a many-to-one form and click to add a new one, the validation class copies as well. Since we are clearing all input values, we should also clear up any validation classes.

bsmithgall commented 9 years ago

@mapsam I wrote a somewhat generalized jQuery plugin to do the copying. It might be helpful to you.

mapsam commented 9 years ago

Thanks for the snippet, @bsmithgall!

This is no longer an issue since we are now using a hidden "clone" for adding new fields, and not copying pre-existing inputs.