Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

125
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda