How to correctly map ACF repeater fields to Formidable Forms repeater fields ?

By: Cedric Neveu | Asked: 04/11/2022
ForumsCategory: How-toHow to correctly map ACF repeater fields to Formidable Forms repeater fields ?
Cedric NeveuCedric Neveu asked 2 years ago

Hi,

I try to figure out how to correctly map ACF repeater fields (used for a custom post type) to Formidable Forms repeater fields of a form (that creates/update posts).

Thanks to this article https://formidable-masterminds.com/repeater-fields-and-acf-integration/, I succeeded to populate and update ACF repeater fields of a post when I create / update a form entry.

But when I update the ACF repeater field of a post from its edit screen, it doesn't update the form entry...

If someone has a solution, it would be great !

Best Regards,

Cedric

Steve WellsSteve Wells replied 2 years ago

Hey Cedric,
ACF repeater fields (and date fields) are stored in different formats in ACF than in FF. This makes a two-way sync of data very difficult. It isn't currently supported by ACF/FF, and I'm not aware of any workarounds.

However, This is on the Formidable roadmap as something we in the early stages of researching and designing to support this functionality in the future.

I'm following along and would love to know if another community member has a solution or workaround for this use case.

Cedric NeveuCedric Neveu replied 2 years ago

Hi Steve, thank you for your response. Great if it is on the Formidable roadmap !

1 Answers
Victor Font answered 2 years ago

Out of the box, ACF and Formidable provides a one way link from Formidable->ACF. To update a WordPress post and provide an ACF->Formidable direction, you could use the WordPress edit_post action to update the Formidable entry's meta.

The trick is how to get the Formidable entry ID so the update functions work. You're saving the Formidable entry id in the custom CPT fields, then you already have it. If you don't have the entry id saved with the CPT, then you you have to use the CPT post_id to link to the Formidable entry. Any post created by the Formidable Create Post action has its entry id stored in the frm_items table.

Cedric NeveuCedric Neveu replied 2 years ago

Hi Victor,
Thank you for your response. Yes, it's a one way link from Formidable->ACF. When I will have a little more time, I will dig into finding a solution and will post it if it works.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right