Home › Forums › Add-ons › Repeater Field › Fixing Number Of Repeater Rows With Dropdown? › Reply To: Fixing Number Of Repeater Rows With Dropdown?
Hi @Peter Willis
I would write some JS code to listen for a change on the select field, and then trigger a click on the repeater field’s ‘add new row’ button x amount of times.
Then, you can set the data-min
and data-max
attributes on the repeater field element for ACF to handle the min / max validation.
Please use firebug to see these attributes clearly.
Thanks
E
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.