Is it possible to show/hide field descriptions based on a drop-down?
Update:
All fixed.
Remember to change field names!
Here is the code that will do this:
function termtime(){
if (fd.field('PSTermTime').value == "Term Time Only"){
fd.field('PSNewHours').description = "My Message";
$(fd.field('PSNewHours').$el).ready(function(){
$(fd.field('PSNewHours').$el).find('.text-muted').html('My message.')
})
}
else{
//hides the message
fd.field('PSNewHours').description = "";
}
}
//calling function on change
fd.field('PSTermTime').$on('change',termtime);
//call on load
termtime();