Unable to hide Tab in dialog based on checkbox when dialog opened | Community
Skip to main content
praveenk9057427
Level 2
Aug 25, 2021 10:09 AM UTC
Solved

Unable to hide Tab in dialog based on checkbox when dialog opened

I am trying to hide Tab in dialog based on checkbox value.

Able to hide and show on change event of checkbox value.

But unable to hide it when we open dialog.

 

To hide Tab, I am doing like below 

$(".coral3-Tab[aria-controls=' "+$("#customId").closest(".coral3-Panel").attr("id")+" ']").hide();

 

Tried with dialog-ready event, but getting undefined. 

Could someone please suggest on any other approach?

Thanks in Advance.

 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
praveenk9057427
praveenk9057427Accepted solution
Level 2
Aug 25, 2021 12:13 PM UTC

I am able to fix it. Thank you @kishore_kumar_  and @asutosh_jena_ .

The order of events I observed when loading dialog are like

"dialog-loaded"

"dialog-ready"

Normally - on dialog ready event we are able to show or hide individual fields. But if we want to hide a Tab based we need to get Tab id. That tab coral Id's are not available even on dialog-ready.

so I added Coral.commons.ready(function() {} );  and added based on checkbox value hide/show Tab id logic. Inside in coral ready function , am able to get the Tab id.

 

Thanks.

5 replies

New Participant
Nov 4, 2022 9:48 AM UTC

Hi @praveenk9057427, Can you please share the complete js for the same?

Translate
praveenk9057427
praveenk9057427AuthorAccepted solution
Level 2
Aug 25, 2021 12:13 PM UTC

I am able to fix it. Thank you @kishore_kumar_  and @asutosh_jena_ .

The order of events I observed when loading dialog are like

"dialog-loaded"

"dialog-ready"

Normally - on dialog ready event we are able to show or hide individual fields. But if we want to hide a Tab based we need to get Tab id. That tab coral Id's are not available even on dialog-ready.

so I added Coral.commons.ready(function() {} );  and added based on checkbox value hide/show Tab id logic. Inside in coral ready function , am able to get the Tab id.

 

Thanks.

Translate
Level 2
Jun 16, 2023 6:37 PM UTC

Hi @praveenk9057427 ,

could you please help me with the solution, I am having same requirement .

Translate
Asutosh_Jena_
New Participant
Aug 25, 2021 10:44 AM UTC
Kishore_Kumar_
Level 9
Aug 25, 2021 10:28 AM UTC

Hi @praveenk9057427 ,

 

Can you please refer the below document and try. It has detailed explanation steps for hiding tabs on page load and hide/show tabs on change event.

https://www.albinsblog.com/2019/02/how-to-hideshow-tabs-in-coral-3-ui-dialogs-aem.html#.YSYamo4zbIU 

Translate