Thank you
Here is the message that i wanted to post earlier:
For other users and my own documentation the answer:
Load jquery:
Code:
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
Hide input element at load.
Code:
#cbfv_65 { display: none;}
The div id contains the input elements and is constructed with the ID of the field, 65.
Code:
$("#cblabcb_FIELDNAME__").click(function () {
var x = document.getElementById("cbfv_65");
if (x.style.display === "none") {
x.style.display = "block";
} else {
x.style.display = "none";
}
});
The click on function is set on the labels which is constructed with the fieldname. When clicked it will change the display status of the div (cbfv_65).
One small thing, the first time you need to click twice to unfold it.
For Gantry template users
Go to page settings:
Custom Content - the load jQuery script.
Add an atom 'Custom CSS / JS' - place here the css and javascript, check the 'Before </body>' option.
It was not possible to load the atom only on the particular pages like a module. If you want that you should make a separate template only for those pages.