I am trying to hide certain elements of a custom form when an Enum List equals a certain value.
<div>I have been using the below for Strings, but it does not work for Enum Lists.</div>if(pageForm.viewModel.UserInput2 == 'Full Time') {<br>//Choose the fields to hide<br>var endDateLabel = $(".form-group label[for='SRDate2']");<br>var endDateInput = endDateLabel.next();<br>endDateLabel.hide();<br>endDateInput.hide();
}
So far I have tried just using the property name, and below:
Anyone know how to reference Enum lists and their values?
Cheers
var TrainingTarget = "3f711d2c-513a-a7bf-7c54-55f0829b3a8d"
if(pageForm.viewModel.TrainingTarget == 'Individual Training') {
//Choose the fields to hide
var GrpLabel = $(".form-group label[for='SRString6']");
var GrpInput = GrpLabel.next();
GrpLabel.hide();
GrpInput.hide();
}