Home › Forums › Front-end Issues › Select2 in frontend form repeater › Reply To: Select2 in frontend form repeater
Okay, I figured it out. The JS actions ACF offers were the solution. So if someone else stumbles across the same problem, please have a look at http://www.advancedcustomfields.com/resources/adding-custom-javascript-fields/
If you want to initialize a new select2 for example use following JS
acf.add_action('append', function( $el ){
//$el is the appended element, in this case a row
$el.find('select').select2();
}
Thanks for this great plugin.
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.