The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group
Formidable forms and SmoothState js
Hi!
I'm fetching my pages via smoothState js - which uses ajax. So my website never refreshed and in someway becomes an SPA.
I have a problem with loading of Formidable forms javascript files. When I fetch and inject html, javascript does not load.
Is there some hook to reinit all js demanded by Formidable forms after my html was loaded by Ajax?
Regards,
Viktor.
June 18, 2018 at 1:39 pm
I like this topic. How we can use FF with a SPA or Js from the frontend. I recommend you to load FF scripts where you need it, using something like a lazy load of the scripts or load it using ajax like in the next example from http://w3bits.com/async-javascript/.
<script>
$.ajax({
url: 'http://yoursite.com/script.js',
dataType: 'script',
cache: true, // or get new, fresh copy on every page load
success: function() {
// Callback
}
});</script>
I hope this help you. I will write post for this topic.
Discussion closed.