thomasbubi Posted November 1, 2019 Share Posted November 1, 2019 Hello, I did some performance optimizations on our website and i discovered a bottleneck which originates from how a form build with FormBuilder is embedded into the site. We have a navigation bar on the website. Inside the bar, there is a option to open the contact form, which is then opened as an overlay over the current page. To achieve this, the form is rendered in ProcessWire's _init.php and then inserted under the <main> tag. This happens on every page the user views and unfortunately FormBuilder seems to have ugly dependencies like jQuery 1.11.1 which is inserted into the <head> of the document, which has negative effects on performance. I like the idea of openening the form in an overlay, but I would like to change the code so the form is only rendered when the user clicks on "Contact" in the navigation bar, maybe using an iframe. How would I do this? Thanks a lot! Link to comment Share on other sites More sharing options...
elabx Posted November 1, 2019 Share Posted November 1, 2019 You can embed a form in an iframe using: $forms->embed('form-name'); Link to comment Share on other sites More sharing options...
thomasbubi Posted November 7, 2019 Author Share Posted November 7, 2019 Thanks, that solved my problem ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now