store and remove the html5 required attribute when the dependent-field is hidden (This could the form from submitting with no proper error messages for the user)
Change the default behavier to hide and disable (This prevents the hidden fields from beeing submitted), old behavier is still archivable
store the disabled status before hiding and restore when show
clean up the filter('[data-important]') and not('[data-important]') (Can't see way they are usefull? Will initialize anyway, so remove them)
sorry for putting everything together in a big pull request. If you have questions or just want to pull in parts feel free to do so.
Have done some improvments
filter('[data-important]')
andnot('[data-important]')
(Can't see way they are usefull? Will initialize anyway, so remove them)sorry for putting everything together in a big pull request. If you have questions or just want to pull in parts feel free to do so.