Support

Account

Home Forums Add-ons Repeater Field Display Values from Options Page Repeater Field in CPT Editor?

Helping

Display Values from Options Page Repeater Field in CPT Editor?

  • I have a membership post type setup and each post is a tier of the membership. I will display the features of each tier on the frontend as a comparison table. However, I don’t want my client to have to type all the features out for every new tier she adds. I want her to only add them once (in the options page repeater field I have created). Then I want to pull those values she inputs to display in the post editor area of the membership post type. This way, she can just check the boxes and it’ll display those checked on the frontend for that specific tier. See screenshots for better explanation.

  • You need to give each row of the repeater some unique identifier. Rows can be reordered in the repeater, when this happens there isn’t any way to match them up. Also, things can be removed, added, etc. This needs to be dynamically generated in some way. Here is one example: https://second-cup-of-coffee.com/creating-unique-ids-for-acf-repeaters/, if you search you will find others.

    You use a select field and dynamical populate the values of that field using the unique value from the repeater as your select value and the feature name as the label.

    On the front end you get this field then loop over the repeater showing the rows that match the selected unique values.

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

You must be logged in to reply to this topic.