EDIT: updated verbiage to reflect this is specifically a Radio Button choice field. The below script works when the choice is set to display in a drop down. I'd like to be able to do the equivalent when the display type is set to Radio Buttons.
I am trying to get the value of a choice field (set to display as radio buttons) using jQuery and SharePoint Online. I'm adding the script to a script editor web part on the edit form.
<script type="text/javascript" language="javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script type="text/javascript" language="javascript">
function PreSaveAction() {
var myDesVal = $("select[title='Destruction Approval'] option:selected").val();
alert(myDesVal);
}
</script>
The above returns undefined
when a value is selected and I click the Save button. I would eventually like to make another field required if a particular Radio Button is selected.
Radio Button
and notDrop Down
. This will allow users to give correct solution.