116 Posts
nycxav
10 years ago
6
Topic
HI,

I have a form with multiple tabs let's call them tab1 and tab2. In tab1 I have tab1_field1 and it tab2 2 if have a number of tab2_fieldx
I want to hide tab2 entirely when tab1_field1 = xyz.

I have set a conditional state for tab2 (the tab field itself) but unfortunately the tab always appears.
I have also set, the exact same way, conditional states for tab2_fieldx and wthey behave as expected, i.e not displayed when tab1_field1 = xyz
So my conditions look alright.

When I look into the source of the page though I notice that what's actually displayed is the link to my tab2. There is a link with href=#tab2 but the element with id tab2 is actually not a child of that a link element so I suspect that's why the link is still displayed even though the tab2 itslef is not visible.

I hope it makes sense.

I'd imagine javascript can help here can I use "stuff" on the tab2 field plugin definition (under storage) to that effect?
I have tried that too but was unsuccessful.

Help appreciated.
Thanks.

Xav.
Get a Book for SEBLOD
10 years ago
0
Level 1
i'm also curious if conditional states applicable for built-in DIV's ?
10 years ago
0
Level 1
by the way, does Seblod uses own CSS styling for TABs/DIVs or Joomla's?
4229 Posts
Kadministrator
10 years ago
1
Level 1
Hi,

this looks like a bug, I tested and conditional hide on tab does nothing, I reported it on the tracker
127 Posts
Cappu
10 years ago
0
Level 2

Hi Klas,

any news on this? - Are there plans to fix the hide-tabs bug?

10 years ago
1
Level 1
Thanks for confirming it's a bug.  I am trying to do something similar for a tab in the Content display.   I want to hide tab2 if a value within the tab is nil. I have tried coding the condition in my template override however it still renders the tab (I don't see where you would had a condition for the tab in the Content Type under Content display).  I wrapped the tab rendering inside an IF condition testing the internal variable (true/false) expecting it not show.  No luck, it always shows.
8 years ago
0
Level 2

Hello Joem,
do you have a solution to this problem? I've been trying for several days to hide an empty tab.
Greetings Ralph

Get a VIP membership