Support

Account

Home Forums Feature Requests Reusable Field Groups

Solving

Reusable Field Groups

    • TimH

    • July 27, 2015 at 6:58 pm

    Hi Darisi,

    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

    • July 27, 2015 at 7:17 pm

    @timh Ah thanks, so maybe it just doesn’t work with the reusable field group being a flexible content.

    I thought the reusable field group works as a “row” so you could add more html etc. to the template.

    • TimH

    • July 27, 2015 at 7:22 pm

    @darisi Please be aware that there are multiple Reusable Field Group plugins:

    https://github.com/mvpdesign/acf-reusable-field-group
    https://github.com/tybruffy/ACF-Reusable-Field-Group

    I’m using the second, i don’t know how the first one works.

  • @timh The first one only fix the issue when you want to use multiple instances of the same ACF Reusable Field on a single page.

  • +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.

  • +1 This would be great to have as part of the core. It would save us having to write our own custom field type which is a bit time intensive when all you want to do is be able to reuse a collection of fields.

    • catch22

    • August 27, 2015 at 9:18 am

    +1 for infinite recursion. Something like this would be great for layout building.

    • darisi

    • August 27, 2015 at 6:11 pm

    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.

  • +1

    I started a thread that fleshed out my thoughts on this.

    http://support.advancedcustomfields.com/forums/topic/reusing-flexible-content-fields/

  • 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 acf_local().

    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.

    https://github.com/Hube2/acf-reusable-field-group-field

    • folbert

    • November 7, 2015 at 3:14 am

    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.

    http://support.advancedcustomfields.com/forums/topic/fewbricks-an-acf-extension-for-reusing-fields-and-much-more/

    • Noma

    • November 18, 2015 at 6:51 pm

    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”.

    • Buswell

    • November 26, 2015 at 1:08 pm

    +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.

    Examples:
    – 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

    • delwinv

    • December 15, 2015 at 6:07 am
    This reply has been marked as private.
    • delwinv

    • December 15, 2015 at 6:10 am

    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.

    In operation, the data is all saved fine, so I can (myself) get around the issue by using this last radio button group to toggle the relevant fields for all of the included groups and set the relevant fields for each, then end with the final group. But this will not be acceptable for my clients, and is obviously not the desired behaviour. I assume the javascript that initiates the conditional fields needs some modification. Hopefully there’s a filter that can be used for that.

    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

    See: https://www.advancedcustomfields.com/resources/clone

  • Yes, I have long ago stopped supporting the add on that I created because there is not longer a need for it and I doubt it would even work now.

Viewing 19 posts - 26 through 44 (of 44 total)

The topic ‘Reusable Field Groups’ is closed to new replies.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.