Home Forums ACF PRO Register fields with php, The field groups are not visible in dasboard


Register fields with php, The field groups are not visible in dasboard

  • Hi,

    I made repeaters fields and exported them as PHP, then deleted that fields group.
    Then i added that PHP code to my function file, and the fields are working fine and visible in posts.
    But the fields group UI is not visible in the Custom field menu in the dashboard. Its showing there is no group field created yet.

  • Field groups created using PHP do not appear in the list of field groups in the ACF admin. They only appear as fields at the places you set in the location rules.

  • is there any option to display that in dashboard as well because i need to change something from there as well

  • This is very awkward! Showing the field groups on Dashboard must be considered as a very basic requirement with top most priority irrespective of the way they have been created!

  • You cannot edit field groups created in PHP with the ACF admin. What would be the point of showing them?

  • Thank you for your quick reply!

    It seems to me that unlike field definitions, field groups do not have all the necessary information in the code.

    If I am right, the question is why we don’t have them in the code? Otherwise, why can’t the field groups be shown? This is a not only a feel-good factor for the administrator, but also, it allows a quick edit opportunity.

    Is it on purpose?
    I would say it is a limitation, but any chance that you might come up with a solution?

  • I am not sure what you mean by field groups not having all necessary information in the code. What is it that you think is missing?

    There simply is not any way that ACF can know what field groups are created in code and if by some chance this could be worked out there isn’t any way for ACF to make changes to PHP code where the field group is created.

    Maybe I am being dense, but I don’t see the reason behind having the field group in the ACF admin without the fields associated with that group. But if this is really what you want to do you could define the field group in the ACF admin and not add any fields to that group in the admin and then add all of the fields to the group by using acf_add_local_field(). But you cannot have the field group definition in the DB and in PHP because one would override the other. ACF will not add a field group from your PHP that already exists in the DB because it sees that it’s already created and ignores the request.

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

The topic ‘Register fields with php, The field groups are not visible in dasboard’ is closed to new replies.