Hi there,
I’m just wondering what the repeater values (not children) represent in the database?
Is it a count of how many fields there are for that particular repeater?
https://ibb.co/5rpW7Vs
I have attached an image of a simple repeater with a text field, the field marked ‘repeater’ with the value of 2 is what I am asking about.
Many thanks.
The value stored for the repeater is the number of rows it contains.
Thanks for your reply,
Just out of curiosity, is there a reason why ACF needs this count? And where is it used?
Many thanks.
So that it knows how many rows to get from the db. The sub field names are derived in a loop something like
foreach ($i=0; $i<$rows; $i++) {
$sub_field_meta_key = $repeater_name.'_'.$i.'_'.$sub_field_name;
}
It’s not exactly that, the example is extremely simplified.