Is it possible to add a placeholder field type which essentially tells ACF to stop using tabs after that point?
As far as I can see, you can add fields before you start using tabs, but after you add tabs to a field group, I’m not sure if there is a way to stop!
So, say if you’re setting up a field group with a tabbed layout as follows:
Well this works just as expected. Text field #1 is above the tabs, whilst Fields #2 and #3 are respectively contained within tabs ‘Foo’ and ‘Bar’.
What if you then wanted to add an additional text field below the tabbed layout, not actually as part of a tab? Is there a method to ‘reset’ the layout, or to tell ACF to stop using including fields in tabs?
I’ve just addded in a new setting to the tab field which allows it to be set as an end-point.
This means it will start a new group of tabs separate from any existing ones.
This allows you to:
1. Create multiple groups of tabs within a field group
2. Create a a tab endpoint with a blank label – will simply end the tab groups.
Will be released in the next version 5.2.8
Hi Guys, Hi Elliot,
Nice of you to add this feature, truly useful but I ran into a little bug here.
As described by you in the 5.2.8 change-log I added an empty tab field to the end of a tab group and set it as an end-point; immediately after I added a Message Field which I use as an introduction to the next group of field. As you can see in the screenshot below.
But when I go the page editor the Message Field, even if set to be above the next tab group it somehow ends up inside the field group. As you can see in the next screenshot.
Did you set the tab labeled “Left Box” as an end point and the tab with no label as an end point?
For me this works if the tab before is an end point without a label and the tab after is an end point with a label. Then the fields in between appear outside of all of the tabs
Using unlabeled endpoint tabs to allow for fields between tab groups should definitely get added to the Tab field documentation! I’ve been wishing it was a thing for months before finally stumbling in here and realizing it was there all along.
Just never though to leave a required field blank, you know? The hazards of being a hardcore rule-follower, I suppose.
I noticed that tab layout does not break when displaying acf_form in as page content (i.e. with acf_form_head() + acf_form() in theme template)
– create acf group a dropdown with 2 values and 2 tabs appearing each according to the dropdown value (so tab #1 appears when dd has value #1 and tab #2 appears when dd has value #2)
– create another group, with higher order value, containing a text field.
– display the forms in your page.
Fields in the second group will only be displayed then dd has value #2.
If you add the empty endpoint tab second group will correctly show. But the tab will be displayed as an empty (gray?) item between the 2 groups.
I can provide the code, tested on WP4.6.1 and ACF Pro.
The topic ‘Tab Layout Reset’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!