Add possitbility to create hidden palettes in TCEForms
sometimes it's useful to have fields rendered in TCEForms, but never display them anywhere.
One such occasion, where that is useful, is for the "foreign_field" feature of IRRE. As you might know, IRRE makes it possible to render something called a "foreign_selector" which lets the user choose from records of another (third) table (not the IRRE child table) to create relations to by using an intermediate table (the IRRE child table). However, there is one problem with it: IRRE requires the field of the intermediate table, which carries the link to the third table, to be always displayed in the form, even though it only carries technical information (the relation) which the user doesn't need to see at all. Of course, one could also change IRRE to not require the field to be present any more, but that would be technically much more challenging and more error prone.
Now: Why go the way of "hidden palettes" instead of "hidden fields" directly?There are two points speaking in favour of implementing the hide functionality per palette instead of per field:
- It's more flexible: Fields can be hidden in one scenario and displayed in another scenario (depending on which palette they're rendered in)
- it's easier to implement: For palettes, you can simply hide the link to the palette. For fields, it's hard to do, because fields always go into a strict template for which a new table row is created by TCEForms, so they remain visible.