Support

Account

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.