Hello! I'm pretty new to Power Pages and I've been back and forth with this code trying to figure out how I can set up my Power Pages form. I want to make it so that if a user chooses Holiday in one choice field, that it also selects "Holiday" in another choice field. This is the code I have so far:
$(document).ready(function () {
$("#cr53b_otdateclassification").change(onDisplaySectionChange);
onDisplaySectionChange();
});
function onDisplaySectionChange() {
var varOTDateClassification = $('#cr53b_otdateclassification').find("option:selected").text();
var varOTClassification = $('#cr53b_otclassification').val()
if (varOTDateClassification === "Holiday") {$('#cr53b_otclassification').val('Holiday');};
}
If I could get some help, I'd greatly appreciate it!