Adding multiple blocks to 1 object
How can I add multiple blocks with fields to 1 object?
I need to add different blocks to the Application object and hide from depending on the category.
I tried to remove the error display when adding a block to 1 object, but only the last added block was displayed, how can I solve this problem?
there are conditions for hiding only for blocks with fields, but not for the fields themselves
I tried to delete this block of code, as a result it turned out to add several blocks with fields, but still only the last active one is displayed
window.onload = function() {
switch (document.querySelector("[id^=select2-dropdown_itilcategories]").title) {
case "alter":
document.querySelector("label[for^=twozerofourtwozerotwotwoninezerozerofield]").style.display = "none";
document.querySelector("input[name^=twozerofourtwozerotwotwoninezerozerofield]").style.display = "none";
document.querySelector("label[for^=oneonefivetwotwoeightzeroninethreeeightfield]").style.display = "none";
document.querySelector("input[name^=oneonefivetwotwoeightzeroninethreeeightfield]").style.display = "none";
document.querySelector("label[for^=fivesevenzeroeightzerooneninezerofivefield]").style.display = "none";
document.querySelector("input[name^=fivesevenzeroeightzerooneninezerofivefield]").style.display = "none";
document.querySelector("label[for^=twozerofivefivefourfivethreefourthreefourfield]").style.display = "none";
document.querySelector("input[name^=twozerofivefivefourfivethreefourthreefourfield]").style.display = "none";
document.querySelector("label[for^=onefiveseventhreezeroeightninefivetwotwofield]").style.display = "none";
document.querySelector("div[id^=onefiveseventhreezeroeightninefivetwotwofield]").style.display = "none";
break;
}
}
it turned out to work around so if anyone is interested, I get the name of the category and if the name fits the condition, I hide unnecessary fields, I added the script to the file drag-field-row.js
There has been no activity on this issue for some time and therefore it is considered stale
If this issue is related to a bug, please try to reproduce on latest release (GLPI and plugin). If the problem persist, feel free to open a new issue.
If it is related to a new feature, please open a topic to discuss with community about this enhancement on suggestion website.
You may also consider taking a subscription to get professionnal support or contact GLPI editor team directly.