Displaying a table on a Catalog Item using the HTML variable.

gregdormon
Kilo Contributor

Hi all,

Currently I'm creating a Catalog Item for a Firewall Access request. Rather than using multiple variable sets of 6 multi line text fields and catalog policies to show/hide those fields, I figured creating a table would be much easier. Creating the table was pretty straight forward however on the Catalog Item, the toolbar and border are still displaying allowing the table to be editied which I do not want.

find_real_file.png

The table is somewhat rudimentary but I want to know if there's a way to hide the toolbar and border? This would make it so that just the table itself is displayed AND allowed to be typed into. My first guess would be that the DOM can be manipulated but I'd rather not do this...

Any suggestions?

Greg

16 REPLIES 16

Deepak Kumar5
Kilo Sage

Hello Greg,



You can hide the toolbar but that will be Global.


I think it is better to use Onload Client script to Hid it from Catalog item.



function onLoad() {  


  var sheet = window.document.styleSheets[0];  


  sheet.insertRule('.mce-toolbar-grp { display: none !important; }', sheet.cssRules.length);  


  sheet.addRule('.mce-toolbar-grp ', 'display: none !important;', -1); // IE likes to be different  


}


Hi Deep,



That's pretty much spot on what I'm looking for, thanks for the adivce


Deep K,



Using that client side script works for removing the "tool bar" effectively from the Catalog Item.


However I'm not too clued up with CSS but something in that script is causing the rest of the UI policies currently on the item to not function correctly, where these policies show/hide variables on the Catalog Item.



Any idea's on why this is happening and if so, how to fix it?


For what it is worth, I had that same issue - interestingly enough with our firewall request on the catalog.   I gave up trying to use the HTML variable type.   What I ended up doing instead was a macro variable and building a bootstrap grid.   This is helpful since (in our case) there is no telling how many lines they will need and the bootstrap table is dynamic enough to keep building.  



You could just allow the downstream workers (tasks) to see the table or - what I did was take the entries from the table and populate them all pretty-like in a multi-line text variable that the task-workers see.