how to do variable editor read only
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-11-2017 11:28 PM
I have a requirement to make the variables under Variable Editor Read-Only once an INTAKE is generated (from a submission of a Service Catalog).
function onLoad() {
var template = g_form.getValue('u_template');
if (template != "28c64a0837f1cf00548b53b543990efd"){
var sections = g_form.getSections();
sections[2].style.display = 'none';
sections[2].style.display = 'none';
//To do variable editor read only
$(variable_map).select("item").each(function (elmt){
alert('hi');
try {
alert('qname453467568');
g_form.setDisabled('variables.' + elmt.getAttribute('qname'),true);
alert('qname');
} catch (err) {
}
});
//
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2017 01:36 AM
Hi Avinash, Its not working please suggest me
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2017 01:59 AM
It is not working, so i tried this, it is working now but, list collecter and check boxes are still editable, please let me know how to do read only for check box and list collecter
function onLoad(){
try{
//Get the 'Variables' section
var ve = $('variable_map').up('table');
//Disable all elements within with a class of 'cat_item_option'
ve.select('.cat_item_option', '.slushselectmtm', '.questionsetreference').each(function(elmt){
elmt.disabled = true;
});
//Remove any reference or calendar icons
ve.select('img[src*=reference_list.gifx]', 'img[src*=small_calendar.gifx]').each(function(img){
img.hide();
});
//Hide list collector icons
ve.select('img[src*=arrow]').each(function(img){
img.up('table').hide();
});
}
catch(e){}
}