Hi, just checking if anyone has some advice for me on this, I have to implement Sonas Events as a form provider into my existing site built with NodeJS, the current Wappler built form is inside a Partial
The script they have asked me to insert on my page is
When I save/deploy this, i do not see any form on my page at all
Just a loader and then nothing.
I have tried moving the script part, into the head, at the end of the body, as well as inline with the form, all produce the same result of no form displayed. If i take out the conditional region then it displays perfectly.
Is there a way to make the script only start running once the conditional has evaluated to true or something to get around the issue.
Have you tried with the script inside the conditional region? Haven’t reviewed the script content but it probably is running immediately and if your form div is in a conditional then it won’t be found by the script. But if the script is also in the conditional it won’t run until expression is true.
Are you keeping defer for fall back?
If you include both async and defer on a <script> tag, the async attribute will take precedence if the browser supports it. If the browser doesn’t support async , it will fall back to defer .
Yeah, that was my first try, in fact its what it is currently on that page Ken, would you mind taking a little look and seeing if you can figure out some trickery to do a parse or something after its loaded, I am busy reading a post from you on some of your previous exploits on this type of thing.
Lol, Jon, just added a notnow to it, alas still not loading.
You give me too much credit, I am not that smart, I was on Sonas, I asked for the code to add the form to my website, they gave me that exactly, and i pasted it exactly, lol.
They say defer, i say yes, they say async, i say yes… hahaha
I seem to recall a post where Patrick said a conditional is loaded and then removed from the DOM or something like that, so wondering how that effects this.
Seems to be loading after all the core Wappler components, such as AppConnect, but the load has far more content included in it such as all the form fields, which do not show up in the DOM itself, so i assume the conditional is dropping all its content and can not reload it or something.
I don’t really have any idea what could be wrong here, as this is some 3rd party script, but why would you have it in a conditional region? It’s a contact page that shows a contact form. Why make the form conditional?
Its because there are a few different contact forms, and depending on if they came from a google adwords campaign, or an affiliate link I have to show them either this form or that form, all depending upon browser referrers.
I will make them into show hides for now to get around it, thank you for checking though, it could have been something simple i did wrong.