Hi @justsomeone
I hope you’re well today and thank you for your question!
I must admit I’m unfamiliar with swup and we also don’t use it in our plugins as far as I know.
Since it’s not a WordPress plugin that I could just install and test, I’m afraid it would take me quite a lot of time to get a grasp on it and prepare some basic implementation to be able to test it with Forminator but without actually testing I can’t really say much (as we don’t have any other reports on this yet).
That being siad, have you tried to change the way the form is currently loaded? What I mean is that in “Behaviour” settings of the form you can switch it to be loaded via Ajax or not – did you test both ways?
Is there any publicly accessible page where I could actually see the issue live? If yes, could you provide a link to it?
I’m hoping that a look into page source and webdeveloper tools in browser could possibly give us some clue on the case.
Best regards,
Adam
Hi Adam,
first: thanks a bunch for the reply and your time.
Unfortunately I can’t share my local setup for you live. However I’ve setup a test environment where I was able to reproduce the exact same issue. It’s a wp sandbox environment and I’d be happy to share the details with you so that you can do whatever you’d like to investigate into this.
The setup:
– Plain WordPress installation
– Oxygenbuilder Plugin
– Forminator Plugin
– Custom Plugin “Swup” I made which provides the swup js files
The goal is to provide a smooth user experience by having a static header and footer while only the page content changes when navigating through the page. It works very smooth so far but as already said forminator forms are not working. The setup works as the swup transition engine replaces only the content in the content container (id=”swup”). Headers and all JS is reloaded, too.
What works:
– Navigating between pages smoothly
– Opening contact page with forminator form
What doesn’t work:
– Opening e.g. home page and then navigating to contact page with forminator form -> no forminator form is visible
Here’s the page:
http://exuberant-lyrebird.w5.wpsandbox.pro
When you navigate using the menu you should see that the transitions are only within the content while the header & footer stays.
When navigation to menu section “About Us” > “Contact” you will see that there is no forminator form. However if you now reload the page or navigate directly to the page (http://exuberant-lyrebird.w5.wpsandbox.pro/contact/) the form will be displayed.
I would be happy to share the admin login data with you so that you can have full page access to look into this. Can you share a mail which I can use to give you the credentials? Don’t want to announce it here even though it’s a sandbox environment.
Cheers
Hi @justsomeone
Thank you for response and additional explanation!
I’ve visited the site that you set up for me and I can see what’s happening but don’t quite now why, yet. It would help, indeed, to be able to look into the ‘swup” implementation but since you’re using custom plugin I’d need some insight into it.
Could you please send me an email to contact@wpmudev.org using this template:
Subject: “Attn: Adam Cz”
Message: link back to this thread for reference
Keep in mind the subject line as ensures that it gets assigned to me.
Best regards,
Adam
Hello @justsomeone ,
I’m sorry for the delay on our side.
Our developer proposed this code snippet:
add_action( 'wp_footer', function(){
if ( ! is_singular() || ! has_shortcode( get_the_content(), 'forminator_form' ) ) {
return;
}
?>
<script type="text/javascript">
(($,d)=>{
$(d).ready(function(){
setTimeout(function() {
$( '.forminator-custom-form' ).show();
}, 200);
});
})(jQuery,document);
</script>
<?php
}, 999 );
You can try increasing the 200ms of the delay if it’s still not working.
This can be used in functions.php of your theme or as mu-plugin
kind regards,
Kasia
Hello @justsomeone ,
We haven’t heard from you for a while now, so it looks like you no longer need our assistance.
Please feel free to re-open this ticket if needed.
kind regards,
Kasia
Hi Kasia,
I really appreciate your time and effort you all put into this 🙂
The provided snipped solves the issue, thanks very much!
Best,
Robert