Read only all filed in Tab
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"});
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"});
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear Yu,
Please, try the following code:
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
-
- Information
-
Who is online
Users browsing this forum: No registered users and 9 guests