I'd like to hide 'Multiple Lines of Text' (Enhanced Rich Text) field if it's empty, if isn't empty -> show (both for New form & Edit form).
My code:
if($("input[title^='EnhancedRichTextFieldName']").val() == ""){ $('nobr:contains("EnhancedRichTextFieldName")').closest('tr').hide() } else { $('nobr:contains("EnhancedRichTextFieldName")').closest('tr').show(); }
It isn't working and I can't find why. I also tried the 'textarea' tag which should be AFAIK only for the 'Plain Text Field' and it also works perfectly for any other types of fields e.g. 'Single Line of Text', 'Multiple Lines of Text (Plain Text)', Choice (drop-down):
if($("input[title^='SingleLineOfTextFieldName']").val() == "") if($("textarea[title^='PlainTextFieldName']").val() == "") if($("select[title^='DropDownName']").val() == "") //+ change function
Any idea how to make it works for the Enhanced Rich Text?
Many thanks!