Support

Account

Home Forums ACF PRO Can I get a field list for a form which is "location rule" applied ? Reply To: Can I get a field list for a form which is "location rule" applied ?

  • There are internal function in ACF, for example there is a function that gets the field groups based on $post_id, I forget the name of it right now and don’t want to dig, I think it’s acf_get_field_groups() and you can pass this function an array of arguments if one of them is 'post_id' => $post_id then it will return a list of field groups for that post.

    Like I said, ACF requires a post ID to get the field groups or any fields. That post ID could be one of the types that ACF uses for posts, users, terms, etc.