I am using this script Hide/Show field on list form based on value from another field and I can get it to work for one item but I have three to hide based on a choice field and it is not working. I really could use some help!!
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"/>
<script src="https://share.philips.com/sites/STS020170908232517/warboard/SiteAssets/sputility.js"/>
<script>
$(document).ready(function ()
{ // Get a the choice field
var choiceField = SPUtility.GetSPField('Status');
// Hide the target fields in form load
SPUtility.GetSPField('Compeling Event').Hide();
SPUtility.GetSPField('Final PO Signatory').Hide();
// create a function to show or hide a field based on the selected choice Field value
var ShowHideField = function() {
var selectedFieldValue = choiceField.GetValue();
// Hide the 'Other Title' field if the selected value is 'Other'
if(selectedFieldValue != 'Best Case') {
SPUtility.GetSPField('Compeling Event').Hide();
SPUtility.GetSPField('Final PO Signatory').Hide();
}
else {
SPUtility.GetSPField('Compeling Event').Show();
SPUtility.GetSPField('Final PO Signatory').Show();
} };
// attach the function to choice field
$(choiceField.Dropdown).on('change', ShowHideField); });
</script>