This is a quick snippet to increment a row counter for a repeater field. The Slack Formidable Community member that asked how to do this is using the frm_repeat_start_rows filter to pre-load 10 rows in the repeaters. The first field in the repeater is a counter.
To use, change the 234 to the field id of your counter field. For portability to other WordPress environments, use the $field->field_key instead of the ID as in this second example:
Hi Victor,
Is the Slack Formidable Community you mentioned in this post open to new members? I’ve been working with Formidable Forms for about a year and looking to get into some more advanced topics and having a community could be very helpful.
Cheers!
Jake
Hi Jake,
Yes, new members are always welcome to the Slack community. I just sent you an invite.
Hi, this is very helpful, thank you. When you delete a row, there is a gap in the row numbers. Is there a different code snippet I could use so the numbers re-order if a row is deleted so there are no gaps in the numbers?
I don’t think that’s a good idea. Row numbers are not maintained or stored on the back end. A repeater is an embedded form. Each row is its own entry.