Support

Account

Home Forums General Issues How to change templates & retain field data

Solving

How to change templates & retain field data

  • Hello,
    If I have an existing page is applied a template that uses ACF field(groups,tabs,repeaters).
    And if created an upgraded template using same ACF fields.
    Then, how to ensure that when i switch the templates in Edit Page mode, that the content in the ACF fields do not become blank.

  • If the fields are saved to the page and the same field groups are applied to the new template as the old template then all the fields will stay. The only time that you’ll loose data is if you’ve created a new field group with new fields that have different field keys for that content. Field content is attached to the post, not the template.

  • Hi John,
    If my new template, has a duplicate but New field group along with some new fields added.
    Then, will it match existing data or it will be blank.
    If it will be blank, then what changes can be done in Database table to fix that.(i.e, make the new template with new field group use the data of old field group having same common fields.

  • The important parts are the field key and the field name.

    If these two things are the same the data will survive without problems.

    If the field key changes, you will see the data in the admin and the data in on the front end will be available, but in many cases will not be formatted as you expect. In this case you would need to update every post with these fields manually.

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

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.