AnsweredAssumed Answered

How do I keep the subpanel top button hidden AFTER quick create was used?

Question asked by Adam Głębowicz on Apr 3, 2014
Latest reply on Apr 7, 2014 by Sagar Salunkhe
Hello,

I've conditionally hidden the "Select" top button in a subpanel by creating a custom view.detail.php file, adding the _displaySubpanels() function and inside it some business logic that hides the button like below:
unset($subpanel->subpanel_definitions->layout_defs['subpanel_setup']['...']['top_buttons'][1]);

It's clean and it works fine, until I add a new record in the subpanel using the Quick Create form and Save.
The _displaySubpanels() function doesn't get called, and the subpanel refreshes with both the Create and Select buttons visible.

Is there a way to keep the button hidden after Quick Create form is saved? 
I know you could do this in a custom Layoutdefs file, but would like to keep this and the business logic in the custom views folder.

Outcomes