Support

Account

Forum Replies Created

  • Oh yes, I got that, sorry.
    I was asking if there’s a more succint alternative than nesting the clone group inside another group.
    From what I understand there’s none, besides using prefixes, with all the disadvantages you already mentioned.
    The best and most flexible way would be to use Flexible content (which is the way I usually go, but in this project I can’t)

    Nevertheless, I prefer to get the values as an array using get_field on the outer group, without resorting to nested cycles.

  • So your suggestion is not cloning the whole group in #2, but the single fields contained in the “source” group?
    This could be a problem if the source group has many fields or if I need to add a field to the source group.
    In that case I should add the new field in every place I cloned the other fields, and this is something I would avoid.

    What I’m tryng to do is something similar to the flexible content field (which I can’t use for a number of reasons).
    I would like to have a Field Group where I create several “modules”, where each one is a group containing some fields.
    Then in other Field Groups pertaining to pages or posts or whatever, I clone the specific modules I need for that page (the whole group, not the single fields contained in it).
    Also, I could need multiple instances of the same module, which is the topic of this thread.

    What is the best strategy to do this?
    Thank you.

  • I tried to follow the suggestion posted by John in https://support.advancedcustomfields.com/forums/topic/many-of-the-same-clone-in-another-set-of-fields/#post-129384 so:

    1. I have a “Testimonials” group with 2 fields inside that I use only as a “source” to clone where needed
    2. In another page I have 2 groups, “Testimonials” and “Testimonials 2”.
      Inside each of those groups I cloned the “Testimonials” group mentioned in #1, with Display set to Seamless
    3. The values are correctly saved but if I try to print them with the following code, the_row() returns false and “title” is never printed
      if (have_rows('testimonials')) {
      	while (have_rows('testimonials')) {
      	    the_row();
      	    echo get_sub_field('title');
      	}
      }
      

    However if I use this code
    $testimonials = get_field( 'testimonials' );
    all values are inside $testimonials[‘testimonials’]

    Clearly I’m missing something…any clues?

  • Same here…any suggestion?

  • * Issues with repeater fields – when I add the fields inside the repeater, they are picking up a field_id of “acfcloneindex” and then not display correctly on the front end.

    I have the same problem when adding a new field inside a group, in a option page.
    I don’t have ACF Extended installed.

    When I add a new field ONLY using the top button, the field is generated with a key = acfcloneindex and it doesn’t open the field automatically.
    When I save the fields, the field is saved outside the group.

    If I use the bottom button everything works correctly.

    See:
    https://freeimage.host/i/bsDhVs

Viewing 8 posts - 1 through 8 (of 8 total)