After some fiddling and testing, there are two things that would make it all super for me, and that’d probably make a good edition to the plugin:
Are these ideas useful and doable? Would they be considered to be part of ACF or should I make my own extensions?
Sure thing. I’m going to take them in reverse order. 🙂
3. Repeater Field and Flexible Content Field doesn’t really do what I need
I want to group large sections of fields inside one Field Group. The users should not be able to create multiple values for each field.
2. with repetitive conditional logic applied to them, and no wrapper.
In lack of a Group Field (or something similar), I can’t wrap all the “Cars” subfields and only set conditional logic on that group, I need to set the logic on each field, which gets quite fiddly, although it’s not the biggest issue.
I can’t find a way of wrapping a set of fields in a HTML wrapper with the regular ACF.
1. I want it to render directly below the category
Category-specific fields needs to appear right below the category field in the form. This is what the form look like (all are ACF fields):
(Wrapped in a div:) Category-specific fields: [field 1], [field 2], …
…the rest of the form…
With one Field Group for each category, I could have render two forms on the front-end: the main post form and the category subfields form, but this is not an option. I made the conclusion that in order to keep all fields in the same form, all fields need to be in the same Field Group. Am I wrong? Is there a clean way of including fields from one Field Group in another Field Group’s form?
UPDATE: I could set
'form' => false when calling
acf_form() for all per-category Field Groups. That would render them either at the top bottom of the form, but that’s solvable jQuery-wise. Still prefer spitting out ordered HTML, so if there is a better way, shoot!
Conditional logic and category
Another problem is that I can’t set a field to depend on the value of a taxonomy field. Is there an add-on, official or not, to solve this?
I partially solved this issues by (obviously…) only applying the filter on front-end pages.
However, $field[‘type’] = ‘select’ it not intuitive and feels like a hack, so I still suggest implementing choices filtering support for taxonomies.
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!
© 2020 Advanced Custom Fields. Subscribe