Home › Forums › General Issues › How to store a repeater row number as a value in another field › Reply To: How to store a repeater row number as a value in another field
Yes I understand that repeater row order can change and that rows can be deleted. This is why I’m asking what the best solution is to add a unique value for a repeater row and then to store this value in another post that references the repeater row.
I’m not sure what you’re referring to with “permanent_email_address”. We are storing mailing addresses, not email addresses. And nothing is permanent as anything in the universe can change, which is what this whole process is meant to achieve – letting users add new mailing addresses while always keeping intact previous posts that reference previous addresses.
What I’m doing now is adding a “unique_id” field to the repeater row so that there’s something unique / unchanging about each repeater row to store elsewhere. Then I can add this unique_id value to any other post when I want to reference a specific row of a repeater.
I’m just not sure if this is the most efficient way to achieve this goal.
Thanks!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.