billythekid / conditional-fields

Craft plugin to only use fields if certain conditions (other field values) match
MIT License
12 stars 1 forks source link

Hide show tabs #9

Closed bob3s closed 4 years ago

bob3s commented 4 years ago

Hello,

First of all great that you remade this plugin. I believe it's a great extra for craft!

What would be a nice enhancement (for me) is that the conditional field not only can hide or show fields but also hide and show tabs.

In my platform I bundle my fields in seperate tabs (tabs like content, buttons, layout, location etc.). I would start with a base entry only showing the tab content. At the bottom of this tab I would put lightswitches for for example "Add Buttons". When this lightswitch has been turned on the tab "Buttons" appears. This way you can keep fields organised and only show tabs if users want to add certain elements to their entry.

I don't know how hard this would be, because my knowledge for writing plugins is next to zero. I will be looking at your code to try and understand the structure so if I can add extra functionality I will definitly share this.

Kind regards, Bob

billythekid commented 4 years ago

Thanks for the suggestion. I like that a lot.

It shouldn't be a massive undertaking (he says without looking at any code yet) but we just need a list of available tabs in the settings page, and a way to target them on the input page for showing/hiding.

billythekid commented 4 years ago

@bob3s this is now out in release 0.0.5. Thanks again for the suggestion!