Search code examples
tabsorbeonxforms

How to hide a fr:tab in Orbeon 4.10?


Currently using the <fr:tabbable> tag to create tabs in a form. However, when I try to make a tab relevant by referring to an individual node then it does not work. That is, the tab is visible all the time and not getting hidden if the referring node is hidden.

However, changing the <fr:tabbable> to <fr:tabview> worked straight away.

Here is my fr:tab:

<fr:tab id="history-tab" ref="//MY_NUMBER_FIELD">

When running the form if MY_NUMBER_FIELD is relevant then the tab should appear otherwise not.

Does <fr:tabbable> support hiding of tabs? or should I use a different attribute to achieve this effect? I have already tried the 'bind' and 'visible' attributes.

Thanks for your time.


Solution

  • With the <fr:tabbable>, you can use the visible attribute on <fr:tab>. The value of this attribute is taken as an XPath expression, expected to evaluation to a boolean.