I have two radio buttons (Yes/No) and am trying to force it to 'No' when a certain select box selection is made. Here's what I have for the script (below), but it totally disables the radio buttons and doesn't post the data to our db. How can I...
- Force the radio button selection to No?
- Disable the ability to change the radio button from No to Yes?
Still post the data to our db?
$(function() { $('#presence').change(function() { var value = $(this).val() var invitation = value === 'common' || value === 'frequent' $('.radioyesno input').prop('disabled', invitation) if (invitation) { $('.radioyesno input:last').prop('checked', true) } }).change() })