Home › Forums › Front-end Issues › Front-End Form default image and loss of post type › Reply To: Front-End Form default image and loss of post type
Issue: Field Group location rule is being stored to database but is NOT being shown as selected when viewing the Field Group.
Steps to reproduce:
1) Go to Custom Fields menu
2) Select Add New Field Group from top of page. Title: Gallery Details
3) Create fields (XML at bottom of this post)
4) Select Location Rule = Show this field group if Post Type is equal to gallery.
5) Publish Field Group.
6) Go to Gallery Post Type edit screen and the ACF form is there.
7) Go back to Field Group and Edit Gallery Details.
8) The Location Rule defaults back to Post Type = post.
9) If I update anything in the field group and do not also re-change the location rule back to Post Type = gallery, the ACF form will be moved from gallery CPT to post.
I *believe* the issue is related to my initial choice to use _ in my field names (gallery_photo, gallery_event, gallery_photographer) causing the location group to return to default.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2022 Advanced Custom Fields.