I’m not sure what you mean exactly. I just downloaded and installed the plugin. This gives me an extra option in the Field Type dropdown: Reusable Field Group.
I’m using Advanced Custom Fields Pro 5.2.8 with the latest WordPress version, in case that makes a difference.
In my php templates, i just use the regular ACF functions like get_field() to retrieve the values from the Reusable Field Group fields.
@darisi Please be aware that there are multiple Reusable Field Group plugins:
I’m using the second, i don’t know how the first one works.
+10 for having this functionality built in. I’ve been thinking of ways to do this for a while now. It’d be great to abstract out custom field groups and set them up for reuse later.
Many examples of this such as: a big select list that will need to be managed but used in multiple places on the site, complex groupings like for a button field where you need a text field paired with a page link or url and a select list of styles or colors…
I’ve tested out the https://github.com/mvpdesign/acf-reusable-field-group add-on field and am impressed thus far. Grabbing the data is a bit different in that it returns all the values in an array, but once I realized that it was easy to work with. But I think the interface in the back-end used here is the ideal way to do it. It keeps it all very simple.
Would be nice to have these repeated fields as “partials”.
If you have 10+ flexible fields and most of them have same fields for like title with h1,h2,h3 setting etc. Updating these could be a pain on all 10+ flexible fields.
Also in the php templates, you can just create a partials/ folder and have just the fields there for the specific partial field group. You just call them to the flexible php templates and it will be a lot easier to update all of them.
Although i think this is just different approach as we don’t have div containers/rows/columns for the layout building so we need to group sections together that way. Which is nice too though as that approach is close to the drag & drop builders.
I started a thread that fleshed out my thoughts on this.
This weekend I started looking at the available plugins for reusable field groups. Testing and research turned into an entire weekend and at the end I had created my own version of a reusable field group field.
It works a bit differently than the others, it works by rebuilding field groups that include a reusable field group field ans local field groups which override the original field groups. This only works in ACF5, ACF4 does not support
I have not completely tested it and would be interested in feedback or bug reports. I’ll also answer question. There’s not documentation yet, mostly because I think that the instructions when creating the field are pretty self explanatory.
I have had a go at creating an extension that allows for creating field groups programatically which in turn allows for reusable field groups and more.
My fork of the aforementioned plugin is in: https://github.com/devgeniem/acf-reusable-field-group/
It features the fixes mentioned before but also makes the included field groups to obey their location rules and also adds a new location rule: “show only if this group is included to another”.
+1 to this thread!
Replying to Elliot’s post. My ideal functionality would be a “Compound Field” where you could easily make a field that contains other fields and then reuse this throughout the site.
– For buttons I always have a text and an URL field for the Button’s Text and URL. It would not only save me time from making loads of these combinations, but if i wanted to change the URL field to a Page field it could be done in one click
– More complex examples of this. Like banners which have a background image, title, tagline, and body text
ACF Pro is already 50% of the reason I use WordPress but with a few extra fields like this there’d be nothing you can do in Drupal that you can’t do in WP + ACF
John, I’m liking the functionality of your plugin so far. One issue I have with it is in fields with conditional logic. If I have a field group that contains a radio button (0 : URL, 1 : Page, 2 : Download, etc.) and a relevant field displayed depending on the choice made (e.g. Url, Relationship, File, etc.), then things work OK, ONLY when the field group is included once in another field group. The moment I add a second instance of the included field group, the display messes up. In fact, only the radio buttons from the LAST included field operate – and they affect all the conditional field for all the included field groups.
Otherwise I have no issues with the plugin so far. Great work! Let me know if you need some help. I don’t have a great deal of time right now, but to move forward with this plugin, I would need this to work, so am willing to help you on it.
@delwinv, can you post an issue on my github repo? https://github.com/Hube2/acf-reusable-field-group-field/issues. Since this is my add on I’d rather not clutter up this forum with it. If you can attach a .zip file of example field groups I can test with that would be really helpful. I was recently working on fixing the conditional logic issue and I thought I had it.
Edit: I created the issue, but I could still use a .zip file with groups to test with. https://github.com/Hube2/acf-reusable-field-group-field/issues/10
As this remains the thread that ranks in search engines for “Reusable field group ACF”, it might be nice to mention the following here:
Version 5.4 will include a new “Clone” field.
– From John Heubner’s preliminary work on https://github.com/Hube2/acf-reusable-field-group-field
The topic ‘Reusable Field Groups’ 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!
© 2023 Advanced Custom Fields.