Dynamic Content ACF Field Grou / Field Type: Group

Hello Folks,

I have created an ACF Field Group with some group types inside of it. I’m trying to push info from those group type items but I’m struggling on how to do it. Could you guys give a little help.

Scenario:

Field Group

  • Group -> Amazonia (field label: Amazonia, field name: amazonia)
  • Group -> Pantanal
  • Group -> Regiao dos lagos

and so on

Group Types
-> Amazonia

  • label: location, name: location_amazonia, type: text
  • label: description, name: description_amazonia, type: text
  • label: year, name: year_amazonia, type: number

and more fields

-> Pantanal

  • label: location, name: location_pantanal, type: text
  • label: description, name: description_pantanal, type: text
  • label: year, name: year_pantanal, type: number

That’s the pattern I’ve structured. My goal is to dynamic push info from those sub-fields of groups field.

Hello @edgardmello,

Thanks for writing in!

You can utilize the ACF Repeater and have them nested. Perhaps this documentation may help you:

Best Regards.

Hi Ruenel, tanks for the reply!

I believe you have misunderstood what’s my need. The repeater field is unnecessary in this scenario. The data do not require multiple entries of the same data for each location.

For example, the Amazonia Group will have only one location entry, one year entry, and so on.


As shown in the attached images, I have a post type for each location and a field group serving them with four fields:

  • Document Name
  • Description
  • Document File
  • Featured Image

These fields function correctly, allowing the customer to upload as many documents as needed, which are then dynamically populated as displayed in the three image cards below.

My goal with the second field group is to create an options page containing additional information for each location, such as travel location service price, year, description, and other fields deemed relevant by the client. Each extra info needs to be location descriptive so I will now which field to push like {{ acf.option_field({“field”:“regiaolagos_extra_info_year”}) }}

Finally, that’s my doubt !!!

How to push data from the Fields of the Field Group.

{{ acf.option_field({“field”:“regiaolagos_extra_info_year”}) }} <----

Hello @edgardmello,

Thank you for the clarification.

What exactly do you mean by “pushing data”? You can only retrieve data using the dynamic content templates.

We may need to log in to the site to better understand what you’re trying to do. Please provide the login details in the secure note.

Best regards,
Ismael

I’ve just posted user credential for you guys on last reply.

Extra Infos Field groups that’s used by the options page More Info using cornerstone looper.

Extra info has groups with sub fields. I want to pull those sub fields data using looper.

Example {{ acf.option_field({“field”:“regiaolagos_extra_info_year”}) }}

I’ve tried

Looper provider -> {{ acf.option_field({“field”:“amazonia”}) }}. //// Group Field Name
Looper consumer -> {{ looper.field({“key”:“location_amazonia”}) }}. //// Sub Field Name

Hey @edgardmello,

It seems that we cannot access the site.

  • See the secure note below.

Thanks.

Hi Ruenel,

I was testing some snippet codes to pull the list of user by role. I already fixed it.

Also, access it by /edit. /wp-admin is disabled

https://labs.edgardmello.com/edit

Hey @edgardmello,

I am seeing this:

You will have to create 3 independent loopers:

Looper Provider Dynamic Content `{{dc:acf:option_field field="pantanal"}}`
    Looper Consumer 
          Headline `{{ looper.field({"key":"location"}) }}`
          Headline `{{ looper.field({"key":"description"}) }}`
          Headline `{{ looper.field({"key":"year"}) }}`
          Headline `{{ looper.field({"key":"price"}) }}`
          Image `{{ looper.field({"key":"background"}) }}`
Looper Provider Dynamic Content `{{dc:acf:option_field field="amazonia"}}`
    Looper Consumer 
          Headline `{{ looper.field({"key":"location"}) }}`
          Headline `{{ looper.field({"key":"description"}) }}`
          Headline `{{ looper.field({"key":"year"}) }}`
          Headline `{{ looper.field({"key":"price"}) }}`
          Image `{{ looper.field({"key":"background"}) }}`
Looper Provider Dynamic Content `{{dc:acf:option_field field="regiao_lagos"}}`
    Looper Consumer 
          Headline `{{ looper.field({"key":"location"}) }}`
          Headline `{{ looper.field({"key":"description"}) }}`
          Headline `{{ looper.field({"key":"year"}) }}`
          Headline `{{ looper.field({"key":"price"}) }}`
          Image `{{ looper.field({"key":"background"}) }}`

Check out the demo I created in the secure note.

Thanks.

1 Like

Hey, Ruenel! Thanks for the fast reply.

Worked like a charm.

Best Regards!

You are most welcome, @edgardmello.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.