Read only all filed in Tab

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

01 Jul 2019

Hello

I want all fields(text, text area ,drop down box ) read only within one tab using one line javascript. How can we do it?
I use the following code.But can't control all field in each tab using Internet Explorer Browser.

$('div [id*="fd_tabcontrol-0-tab-"]').not("#fd_tabcontrol-0-tab-2,#fd_tabcontrol-0-tab-5").find("td.ms-dtinput > a").attr('onclick','disable').unbind('click').css('display','none');

$('div[id*="fd_tabcontrol-0-tab-"]').not("#fd_tabcontrol-0-tab-2,#fd_tabcontrol-0-tab-5").find("input,textarea,select").css({'pointer-events':'none',"background-color": "#F6F6F6"});

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

01 Jul 2019

Dear Yu,
Please, try the following code:

Code: Select all

$("#fd_tabcontrol-0-tab-1 .fd_field").each(function( index ) {
  fd.field($( this ).attr('fd_name')).readonly(true);
});
Cheers

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 9 guests