Can I somehow insert the required attribute into an input field only if a certain radio is checked?
I have an input field named \"ladder-meters\" that is not require
Tried F. Orvalho, didn't work for me, I had to use
$('#ladder').change(function () { if(this.checked) { $('#ladder-meters').prop('required', true); } else { $('#ladder-meters').prop('required', false); } });
It could be usefull. Thx to F. Orvalho for the structure