• Plugin Contributor nick6352683

    (@nick6352683)


    A friendly warning to all:

    ACF Pro 6.0 is getting developed and v6.0 beta is ready for testing. One of the new features is the ability for the Repeater fields to have pagination.

    Read all about it here: https://www.advancedcustomfields.com/blog/acf-pro-6-0-beta-1/

    After testing, I concluded that by using the Repeater pagination, some of the calculated fields are not tallied correctly…

    Let me specify with this hypothetical example:

    Let’s say we have a Repeater field for invoices. The subfields include quantity, amount, and line total fields. Also the repeater field is set to have pagination.

    We also have a second field outside of the Repeater field Total which will tally the total for the line total subfield from the Repeater field.

    At this point we will get these 3 scenarios:

    1. Inside the Repeater field, the line total subfield will always be calculated correctly (qty * amount).
    2. The total field which sums up the line totals will be calculated correctly as long as you don’t exceed the pagination value. Therefore by default, the pagination is set at 20 records per page, and as long us your repeater field has 20 or less rows, you will be fine… of course the pagination value of 20 rows can be changed to anything you want.
    3. If your Repeater field uses pagination, and you have many rows that the pagination kicks in, the total field which sums up the line totals from the repeater field will not be accurate.

    Bottom line: Do not use the new pagination in the upcoming Repeater field if you need to do certain calculations with the data, such as using the Sum, Average, Count, Min, Max functions.

Viewing 3 replies - 1 through 3 (of 3 total)
  • adechriz

    (@adechriz)

    Hi there Nick, thank you for the great plugin..

    I’m using WordPress 6.0.3 , ACF 5.12.4 , and Calculated Field 1.3.2. I’m trying to make a calculation on the repeater field and it works fine until I save the post. the data doesn’t saved to the database. could you give me some advice?

    thank you

    Plugin Contributor nick6352683

    (@nick6352683)

    My latest test was ACF Pro 6.03, WP 6.1, WP 6.1 RC5, and Calculated Fields 1.3 !!!

    Personally, any version newer than Cacl. Fields v1.3 I encounter issues like the one you mentioned. So, to begin with, downgrade to v1.3 and see if that fixed your issue.

    Also, there might be a possibility that another plugin or your theme is causing this the issue. So if downgrading is not something you are willing to so, test things with no plugins (except Calc. Fields) and one of the default themes.

    Let me know how things work out please, and good luck. I don’t think you using an older version of ACF Pro is the issue here, I really think, the newer versions of Calc. Fields do not play well with the latest Gutenberg versions, and me as a mere contributor, there is very little I can do besides giving some advice. As a theme and other plugin developer, I do share the other devs. frustrations as many things need changing and fixing withy our code with almost every new Gutenberg update, which is every two weeks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Upcoming ACF Pro Repeater Field and Calculated Fields for ACF’ is closed to new replies.