• Resolved tomsim

    (@tomrimm)


    Hello,

    After putting the existing date picker fields under a group field, the previously saved dates have disappeared from the the fields when I want to edit a post. But the strange thing is that they are still in the database if I echo them in my php template, like this: the_field (date_field_name). Any ideas how to get the previous date field data back to display in the post editor custom fields?

    Tom

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Thanks for the feedback! Your question is related to ACF and not the ACF Extended plugin tho, since Datepicker Field & Group Field are both implemented by ACF.

    About your issue: your report is absolutely normal, a Group Sub Field doesn’t have the same name structure than a top-level field. For example in your case, the top-level datepicker field will have the name my_datepicker, and if you move it inside a Group Field, its name will be prefixed with the Group Field Name, for example: my_group_my_datepicker.

    Previously saved values are not ported to the new structure, you’ll have to manually re-save the value by yourself in your post edit screen or by writing a custom script.

    It is also normal that the previously saved values still exist in the database, since ACF never delete values when changing fields structure. So doing a get_field('my_datepicker') will still work on the front-end.

    You can try to reach the ACF Support Forum if need more information about ACF Fields behavior & data structure.

    Hope it helps!

    Have a nice day.

    Regards.

    Thread Starter tomsim

    (@tomrimm)

    Thanks, got it now. Just moved datepicker fields out from the group and everything works again.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Group field breaks date picker fields’ is closed to new replies.