Make Rich Text field conditionally read only?

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
ttanner@wicresoft.com
Posts: 2
Joined: Sun Nov 11, 2018

11 Nov 2018

I have some code that moves fields to read only if a condition is met. it works for all fields that I have except for rich text fields.

fd.field('ExecutiveSponsor').readonly(true);
fd.field('Business_x0020_Justification_x00').readonly(true);

in this example, executive sponsor is a person field, and business justification is a Rich Text mutli line field. i cannot get that field to read only. any advice? im hoping i am just not using code correctly.
Thanks,
Trent

User avatar
AlexZver
Posts: 232
Joined: Mon Aug 27, 2018

12 Nov 2018

Dear Trent,

Have you tried to write something in this field after that? The text input area's color doesn't become grey, but it's unavailable to make changes.

If your field still remains changeable, please try to implement "fd.field('Business_x0020_Justification_x00').readonly(true);" without any conditions.

If that doesn't help either, please provide us a screenshot of the browser console (F12).

ttanner@wicresoft.com
Posts: 2
Joined: Sun Nov 11, 2018

12 Nov 2018

Wow, you are correct. it was read only the whole time. I will use some CSS to try and change the look of the fields to match that of other fields.

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 28 guests