hi
I’m trying to count the number of created rows in front end repeater before click on the update button.
similar to the option that acf have in the back end – Maximum Rows, i need to dynamically determine (maybe with ajax) and hide the add row button after X number of rows.
I understand that one way to do it is with acf/pre_save hook, but i don’t know how.
thanks
So I’m a bit confused, why not just set max rows to the maximum number you want to allow?
I need it to be dynamic – in every post, according to the user, the number of rows changes. so i can’t have a fixed limited row number.
You can use an acf/prepare_field filter https://www.advancedcustomfields.com/resources/acf-prepare_field/ and set the maximum rows dynamically.