Wonderful plugin I’ve heard nothing but good things about if from my partner and have been challenged with the task of supporting it from our Landing Pages plugin through an extension.
So far this has been one of the best developer friendly plugins I’ve worked with and have made great progress with development, but there is one spot I’m stopped at.
When rendering custom field metaboxes on the admin side I need to be able to account for the current page variation loaded in a landing page cpt post.
Variations are set with a url param id and I can grab that id when rendering the fields; but what I need to be able to do now is slightly alter the field id names so that if we have a custom field with id authorbio, it would become authorbio-1 on the first variation and authorbio-2 on the second variation.
I see where acf_render_field() is used to render a field, and I see the filter ‘acf/get_fields’ allows me to modify field values. But I still need help tying it all together.
Forms are rendered with input names like: acf[field_53e2a615d1c24] (which seems to map to a hidden meta key that looks like _authorbio and there is another meta key authorbio that has the saved value.
At the end of the day I need to have a meta key that’s like authorbio-1 and another meta key like authorbio-2.
When I call these values out on the front end I will have the variation id ready, so I would need to hook into the get_field(‘authorbio’) method and tell it to pull the right variation.
At this point I’m looking for a hand hold.
Can anyone help me?