Change background color for readonly field using Javascript Code

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
Hnin Yu
Posts: 14
Joined: Fri Jun 07, 2019

27 Jun 2019

Hello,

I want to change background color for readonly field using Javascirpt .I use the following code.But how can I change the background color in these code.

fd.field('title').readonly(true);

User avatar
mnikitina
Posts: 264
Joined: Wed Jun 05, 2019

27 Jun 2019

Hello!

Please use the following code. Just change the color to the one you need.

Code: Select all

fd.field('title').readonly(true);
$( "input[type=text]:disabled" ).css( "background-color", "#6ce7e8" );

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests