Home Forums ACF PRO Repeater Fields Comparison


Repeater Fields Comparison

  • Hello,

    I’m getting ready to build a new website that compare internet plans from different providers. Here users will select a different plans from different providers and will see the comparison side by side.

    I will use repeater field.


    Provider 1

    Plan A – 1 Mbps – 25 GB Data – $10
    Plan B – 2 Mbps – 50 GB Data – $15
    Plan C – 3 Mbps – 75 GB Data – $20

    Provider 2

    Plan A – 1 Mbps – 25 GB Data – $10
    Plan B – 2 Mbps – 50 GB Data – $15
    Plan C – 3 Mbps – 75 GB Data – $20
    Plan D – 4 Mbps – 95 GB Data – $25

    Provider 3

    Plan A – 1 Mbps – 25 GB Data – $10
    Plan B – 2 Mbps – 50 GB Data – $15
    Plan C – 3 Mbps – 75 GB Data – $20

    Now user will select different plans (max 3 plans) from different providers or same provider, he will redirect to comparison page and will see the chart.

    The question – Is it possible with repeater field group. Because we need to select a particular row of the repeater field group.

    Any suggestions would be greatly appreciated.


  • This would be extremely difficult as there is nothing in the repeater to identify it unless you create that identification.

    Basically you would need to
    1) Get the post where each repeater resides resides
    2) Loop through the repeater until you find the row you’re looking for
    3) Store the value of the row, possibly in an array, for later comparison

    So when selected there would need to be 2 pieces of information passed to the comparison page, the “Provider” and something unique in the repeater row to identify the “Plan” from that provider so that you could do the querying and getting of the row from the repeater.

  • Thanks for the reply.

    It seems very difficult, because i’m not an expert. But I got your point I need to assign an ID to each row (add an unique ID to each row dynamically.). I will try this.

    Is there any other good solution for this, like using flexible content fields or relationship fields over repeater field.

  • I personally would create a hierarchical post type where the top level post was the “Provider” and each “Plan” was a child post. Then you can simply identify the plan and the provider using the plan’s post ID.

  • It is a directory based website, so companies will list and edit their data from the front end only.

    If I go with a hierarchical post type where the top level post was the “Provider” and each “Plan” was a child post, how to link these parent and child post from front end form.

    really I am struggling here, would you provide me some ideas, what is the best way to start this.

    The data will be submitted and edited by companies from the front-end, they can’t access back-end.

    My main post type is Broadband Company, it has all the data with broadband plans.

    I want to create a two archive pages ONE for Broadband companies and SECOND is Broadband plans, the two archive pages have filters with acf data.

    Single broadband page with company data and all it’s broadband plans and user reviews

    I can create archive pages with filters and single company data with plans (If I use Repeater fields for Plans)

    If I use child post for plans, how company will submit the plan from front end. And in plans archive page user click on any page he will redirect to company page not to plan page.

    And users will review the company in single company page in review form he can select which plan (dynamically populate from the plans) is he going to review.

    So which one is best, relationship post types or parent and child post or repeater fields.

    The main problem to me is front end forms and user review forms.

    I don’t want to start this in wrong way.

    Would you provide me some ideas.

  • I explained a similar scenario for someone else earlier this year. Instead of explaining it again here’s a link to it

    Let me know if you have any questions.

  • Thanks, I will checkout this

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

The topic ‘Repeater Fields Comparison’ is closed to new replies.