Hi,
according to the acf_form docs you have to pass an array of field group IDs to specify the fields to display.
As I’d like to use a WP-plugin on different environments – where the field groups are the same with different field IDs: Is there a way to get a field group’s ID by its name (or something like a slug)?
Hi @beevelop
The get_field_objects will return an array of the field group including the id
https://www.advancedcustomfields.com/resources/get_field_objects/
Hope this helps.
The Use of get_field_objects
with the guidance of var_dump
, helped me to prepare my php foreach loop they way I want it.. Thank you James!
Hi @kensley-lewis
Glad to have been able to help.
Feel free to reach out for any other issue 🙂