Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

123
Views
ACF Javascript event not working after FacetWP ajax call

I have build a search/result page with FacetWP and ACF.

On the result page I add the possibility to edit one specific repeater fields for each result listed.

To do that I include in the FacetWP loop this code:

<?php
    $options = array(
        'id'            => 'acf-form_'.$post->ID,
        'post_id'       => $post->ID,
        'post_title'    => false,
        'post_content'  => false,
        'field_groups'  => array('group_6166044822675'),
        'fields'        => array('field_6166066864387'),
    );
    acf_form($options);
?>  

On the main page the button “add row” work well.

When with a Facet I refine the result to show only the post from October 2021 or any other specification, FacetWP import the new search result via ajax. But this time if I click on a “add row” button, nothing happen.

The javascript and the new HTML code imported via ajax by FacetWP are not binded.

There are many answers about binding problem but I can't find how to solve it because the ACF function has no name.

! function() {
    var t = {
            ...
            945: function() {
                ! function(t) {
                    var e = acf.Field.extend({
                        type: "repeater",
                        wait: "",
                        events: {
                            'click a[data-event="add-row"]': "onClickAdd",
                            'click a[data-event="duplicate-row"]': "onClickDuplicate",
                            'click a[data-event="remove-row"]': "onClickRemove",
                            'click a[data-event="collapse-row"]': "onClickCollapse",
                            showField: "onShow",
                            unloadField: "onUnload",
                            mouseover: "onHover",
                            unloadField: "onUnload"
                        }, ...

Is there a way to target this function ?

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!