Page 1 of 1

Read only all filed in Tab

Posted: 01 Jul 2019
by Hnin Yu
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"});

Re: Read only all filed in Tab

Posted: 01 Jul 2019
by Nikita Kurguzov
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);
});