Support

Account

Forum Replies Created

  • I’ve got a quick fix for this, but it’s not ideal. The problem is that Ninja Forms creates a unique modal that is associated specifically the main content region, and it doesn’t support multiple of that modal of one page. When ACF is installed, the modal gets duplicated to account for custom WYSIWYG fields, but that causes a bunch of issues due to the duplication.

    Simple solution is to just remove the fields from ACF fields. Obviously this means you need to manually insert Ninja Forms when using custom fields, but it’s a reasonable compromise.

    
    add_action("admin_head", function () {
    ?>
    <style type="text/css">
    #nf-insert-form-modal .ui-icon {
        display: inline-block;
        text-indent: 0;
    }
    </style>
    <?php
    });
    
    add_action("admin_footer", function () {
    ?>
    <script type="text/javascript">
    window.addEventListener("DOMContentLoaded", () => {
        const ACFS = document.querySelectorAll("#acf-hidden-wp-editor, .acf-field-wysiwyg");
    
        ACFS.forEach((acf) => {
            const FORM  = acf.querySelector(".button.nf-insert-form");
            const STYLE = acf.querySelector("#nf-insert-form-modal + style");
            const MODAL = acf.querySelector("#nf-insert-form-modal");
    
            if (FORM) {
                FORM.remove();
            }
    
            if (STYLE) {
                STYLE.remove();
            }
    
            if (MODAL) {
                MODAL.remove();
            }
        });
    });
    </script>
    <?php
    });
  • Got a bit more info — it seems like the fields actually display correctly if I *dont* have the fields registered on my child sites. On sites that don’t have the fields, the main site data comes through correctly, but on sites that do, the main site data is misformatted.

    EDIT: Or maybe not, it just seems super sporadic. I just re-enabled the fields on all sites, and nothing changed. It seems like not all fields are affected on all sites, it’s like a random mix of some fields working and some not… I have a WYSIWYG field that’s working fine on 4/5 child sites, but unformated on 1, and a repeater that doesn’t work on any. Very odd.

  • @hereswhatidid having the same exact problem — I get the repeater row count rather than the saved data.

    Fields are initialized on all sites, and if I populate the fields on each site, the field works just fine. If I leave the field blank on each site, but populate it on the main site, it returns the row count on everything but the main site.

    Only weird thing for me is that I export the JSON and load in the fields using PHP, but I can’t imagine that would make any difference…

Viewing 3 posts - 1 through 3 (of 3 total)