Home › Forums › Front-end Issues › acf_form_head and google map form inside a modal › Reply To: acf_form_head and google map form inside a modal
Thanks again for your interest John!
Actually, I found my way through this problem and sharing here, in case it helps anyone.
Since I wanted this map to be set globally from the header, then it would require the acf_form_head()
to be always loaded.
It took some effort, but I ended up with this solution:
– Created a separate page
– Added the google map form and styled it to stretch and occupy the whole screen
– Hid all other elements (header, footer, etc)
– Loaded the above page with jquery as an iframe and styled the iframe itself to look like a modal
– After the form submission I look for the $_GET[‘updated’] and if true, I load an inline script to remove the modal
This way, I don’t need to leave my current page, nor do I have to lead the acf_form_head()
where not needed.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.