How can I hide a title to a container variable?

Will Dollinger
Tera Contributor

I have a container in a record producer that is "Additional Information"  but I don't want it to display until a change is set on another field.  I have tried setDisplay('additional_info', false) but it still shows the title.  I can remove it by unchecking the "show title" box but then it does not show up when I setDisplay("additional_info", true).  

thanks in advance!

1 ACCEPTED SOLUTION

sachin_namjoshi
Kilo Patron
Kilo Patron

You need to find out the sys_id of the container and then use in catalog client script:



try {
$("container_03c0169ccd8bf800d16dbf12db4aa87b").hide();
} catch(error) {}



Replace "03c0169ccd8bf800d16dbf12db4aa87b" with the sys_id of your Container Start variable.

The Protoype JavaScript library is included in the platform.

 

Regards,

Sachin

View solution in original post

2 REPLIES 2

sachin_namjoshi
Kilo Patron
Kilo Patron

You need to find out the sys_id of the container and then use in catalog client script:



try {
$("container_03c0169ccd8bf800d16dbf12db4aa87b").hide();
} catch(error) {}



Replace "03c0169ccd8bf800d16dbf12db4aa87b" with the sys_id of your Container Start variable.

The Protoype JavaScript library is included in the platform.

 

Regards,

Sachin

NToo
Tera Contributor

An alternative approach to this that has worked well is to apply CSS to the title via a rich text label:

 

Create a new Rich Text Label Variable on the record producer

Edit the source code of the Rich Text and add CSS to target the container title

<style>
  #your_container_id {
    display: none !important;
  }
</style>

Your container id is likely to be 'container_' followed by the internal name for your variable set, but can also be found via inspecting the page in browser dev tools.

You can also then add rich text into this variable to have it act as a replacement variable set title, or just leave it like this to simply hide the title.

 

This enables us to show different tittles for variable sets, depending on which producer or item they are used on.