Hi @alexadark
You can use the vertical tabs by simply calling:
->set_layout('tabbed-vertical')
In the new version ->set_layout('tabbed') will:
* issue a warning that the tabbed layout is deprecated
* fallback to tabbed-horizontal
To address the problem, just replace calls to tabbed to tabbed-horizontal.
yes i just found that seraching in the code, but it doesn’t work for me π
i have updated all my tabbed to tabbed-vertical but it doesn’t work
I tried on 2 websites and it doesn;t work, this is really annoying, i am using a lot the complex field and with all the fields open it’s a real mess
it would be really nice to have all the fields closed by default when you open a page
and don’t understand why the tabbed doesn’;t work
@alexadark, can you please provide your CF container code? Not sure why this is not working for you. Here is a working example:
Container::make( 'post_meta', __( 'Post Settings', 'crb' ) )
->add_fields( array(
Field::make( 'complex', 'example' )
->set_layout('tabbed-horizontal')
->add_fields(array(
Field::make( 'text', 'example' )
))
));
Oh it works now
don’t know why it was not working in this particular site, when i tried
set_layout($layout) is not working for me at all. I have tried in simple situations (like the example above) and more complex ones with no luck. In this example: https://gist.github.com/Jpwaldstein/b665f8d0185b6b5d8fdaa9984a0f0d14 My goal is to use tabs in order to separate fields inside a complex field, like: row settings, column1, column2, column3, etc.). @htmlburger is this possible, if so how would I implement?
Would love the options like ACF has to basically add a tab as a ‘field’, and anything below it would be inside the tab. Not sure how else to add tabs inside an array within a complex field. Any feedback would be appreciated.
@jonwaldstein
Adding tabs to complex entries in the way you need is currently not supported. You can add tabs directly to containers or display each complex entry as a tab but cannot have tabs inside each complex entry.
To improve readability you can use the separator field but it will still be showing all fields inside the complex entry.
@htmlburger thanks for the reply. I have decided to go about it a more dynamic way. If anyone is interested, I have started to build a page builder add-on for carbon fields:
https://github.com/Jpwaldstein/carbon-fields-page-builder
Its a work in progress and is meant to be a jumpstart for projects.
-Jon