• Resolved programmin

    (@programmin)


    Ninja-forms are running fine on page load, but I noticed if you pull in content with a ninja-form via ajax (after the page has loaded), it will just show that blinking circle loader, even if you have the scripts enqueued that should cause it to render. It seems there should be a function to trigger, like jQuery(window).trigger(‘ninjaforms’) that would re-render any ninjaform html that has been added to the page. Perhaps there is but I couldn’t seem to find it, and I’m not experienced at this Marionette that is used to build the frontend.

    Any thoughts… is it possible to load in a Ninjaform after load?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Kyle B. Johnson

    (@kbjohnson90)

    Currently, form data is localized at page render, with which the form is rendered. This means that calling a new form via AJAX does not localize the appropriate form data.

    We are working on adding support for the WP REST API, which would make this easier, but that is still in development.

    Thread Starter programmin

    (@programmin)

    Just checking up on this, was there recently any improvement or way that ajax-loaded content can have Ninja forms?

    Thanks in advance ??

    Thread Starter programmin

    (@programmin)

    Has there been any progress on possibility of reliably bringing in any Ninja form via AJAX into the page without reloading everything? I even ran the front-end-deps.js script after, and it seems to make no difference.

    The new NinjaForms() object and other objects that initialize stuff, seem to be private scope in that JS so there is no way to call it apparently.

    Is there any changes to make this work with ajax theme please ?

    @programmin you marked this post as resolved , did you find a solution please, thank you

    • This reply was modified 7 years, 10 months ago by fouad.z.

    No update on this at all, after 9 months?

    This is a rather critical thing to have available. It certainly shouldn’t be marked resolved.

    Thread Starter programmin

    (@programmin)

    It is certainly doable if you just dig into the js code for initializing form by id that is printed to the page. I would share it but it has been months since I did this and it is not a public repo.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘No way to call re-render forms, after ajax loads a form?’ is closed to new replies.