Add repeater field data into another form's repeater field in a form connected to the current post

By: Tim Macholz | Asked: 06/26/2023
ForumsCategory: Code SnippetsAdd repeater field data into another form's repeater field in a form connected to the current post
Tim Macholz asked 1 year ago

I have a form (form A) with a repeater field for email addresses that, upon submission, creates a post and adds those emails to an ACF repeater custom field. I have another form (form B) that I want to use to capture additional email addresses and add them as entries in form A's repeater.

The reason I'm doing this is that I want the second form to send an email to those emails upon submission. Think of it like inviting a person to that post. Form B lives on the newly created post, so I'm thinking I could use the current post meta data to determine which form entry is tied to it, but not sure if that's possible.

Ideally I'd do this with one form, but I don't want to send emails to every email in the repeater each time, just newly added emails, and I'm having trouble accessing the array for the repeater to compare to the array in the custom field.

Any idea how this can be achieved? Thanks!

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