Support

Account

Home Forums Bug Reports Clone field saving issue

Helping

Clone field saving issue

  • Hi,

    I have a very annoying issue with the new clone field. I have created a field group called “Layouts” where I have two layouts, Full width and 50-50. The other one has one clone field that clones a Components field group that is one Flexible Content field. The other one has two tabs with two clone fields that both clone the same Components field group.

    When I save a layout with the Full width group, everything works as expected, but when I save the 50-50 layout, the first tab’s field gets the same values than the second’s.

    Apparently the values leave the edit screen as they should, because when I look the raw headers of the save action, they look as follows:

    acf[field_57b2b89f430b3]:
    acf[field_57b2b89f430b3][57b40234561c7][acf_fc_layout]:5050
    acf[field_57b2b89f430b3][57b40234561c7][field_57ab04716261e]:
    acf[field_57b2b89f430b3][57b40234561c7][field_57ab04716261e][57b40237561c8][acf_fc_layout]:secondary_color
    acf[field_57b2b89f430b3][57b40234561c7][field_57ab04716261e][57b40237561c8][field_57ad783e281e2]:pink
    acf[field_57b2b89f430b3][57b40234561c7][field_57ab04716261e][57b4023c561c9][acf_fc_layout]:somebuttons
    acf[field_57b2b89f430b3][57b40234561c7][field_57ab04716261e][57b4023c561c9][field_57b1cb7b34cbb]:
    acf[field_57b2b89f430b3][57b40234561c7][field_57ab04716261e][57b4023c561c9][field_57b1cb7b34cbb][0]:twitter

    One more interesting thing here is, that while the values show up in the edit screen like I described (the second tab’s values show up on both tabs), in the frontend when I use get_field() I get “false” as the value of the layout.

    Any idea where the problem might be?

  • When you clone fields multiple times at the same level then you need to use the field name prefixing feature when cloning. Cloning the same group into two tabs create fields with duplicate names.

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

The topic ‘Clone field saving issue’ is closed to new replies.