Validate Multi line Rich Text

rss

Posted by Christy - Nov 2 ’16 at 11:18

How can I tell if a multi line rich text field is empty.  Neither of these worked:

 

if (fd.field('NatureOfChange').value() == '<p></p>')

or

if (fd.field('NatureOfChange').value() == '"")

 

  • munmon
    Member
    Member for: 2 years 10 months 17 days
    #1 by munmon Nov 2 ’16 at 11:28

    Anything on this? I having the same issue.

  • YuriyMedvedev
    Moderator
    Member for: 2 years 11 months 24 days
    #2 by YuriyMedvedev Nov 3 ’16 at 02:55

    Hi! Use this code, please:

     

     if(!fd.field('Rich').control()._el().find('div.ms-rtestate-write').text().replace(/\W/g, ''))
    {/* your code if field is empty*/ };
Displaying 1 to 2 of 2 messages