External form not working with Hustle Pop UP

I want to use an external form generated by my CRM system in Hustle Pro Pop. It loads the form field but nothing happens when Submit button is clicked. The Form is working properly if it is added on any page.

  • Adam
    • Support Gorilla

    Hello Matt

    I hope you’re well today and thank you for your question!

    Some external forms, mostly if they are either using extensive JS (e.g. for validation) or their CSS is “overlapping” with Hustle CSS, may not work well with Hustle and other “popup” plugins. This is because JS/CSS is actually “processed” by the plugin code so it might get modified.

    If the form is working fine when embedded into the page, a “crude” but working solution might be to actually put the form in its own separate .html file and upload it to some accessible location on site, then include the form as “iframe” inside popup content. It’s not a “nice” way but should do the trick.

    However, I noticed that the form comes from Infusionsoft so there would be much better way. Hustle already includes integration with Infusionsoft built-in so instead of embedding the form you can enable such integration and Hustle would work with it in a native way, via the API.

    The Infusionsoft integration can be turned on and set up on “Hustle Pro -> Integrations” page. You’ll need to add your API key and Account name.

    Once that’s connected, instead of adding form code to popup content, create a new “Email Opt-in” type popup and you’ll be able to select InfusionSoft in “Integrations” section of popup builder and configure all the necessary fields in “Emails” section of the popup builder.

    This way Hustle will work directly with InfusionSoft.

    Kind regards,

    Adam

  • Matt
    • Design Lord, Child of Thor

    Hi Adam,

    Thanks for the info about the Infusion Soft integration, I may look into using that in future.

    For now, I am finding that the only reason my current forms are not working is that Hustle seems to be stripping out my <form> tags.

    Problem seems to have nothing to do with JS or CSS. The forms work when dumped into a standard page because they get rendered exactly as they were entered. Yet when I add them via Hustle the rendered forms are missing the <form> tags (opening and closing), so even though the other form components (inputs, labels and divisions) all survive, the missing attributes within the opening <form> tag, essential for the form to work are not present and so “submit” does nothing.

  • Adam
    • Support Gorilla

    Hi Matt

    Thanks for response!

    What I said previously about JS/CSS stands true in that sense that JS is “processed” (kind of “proxied”:wink: through Hustle PHP code.

    However, in this case, if this is only about stripped “form” tag, I think it would be possible to override that and make Hustle stop stripping them. I’ve asked our developers already to look into it so please “stay tuned” and we’ll update you here (most likely with some small additional code snippet) if it’s doable.

    Best regards,

    Adam

  • Alessandro
    • Nightcrawler & Daydreamer

    Hello Matt, thanks for using Hustle!

    I have replicated your problem on a staging website and I have a created a snippet for you. :tada:

    I have created a Pop-up > Informational and put a form (including one of your CRM), and it works!

    Using this snippet you allow Hustle to include <form> elements in main content.

    Download it here:

    https://gist.github.com/wpmudev-sls/b77ca90447253cbb29b4ee7be8039388

    If you want to know more on how to install a mu-plugin, visit this link:

    https://wordpress.org/support/article/must-use-plugins/

    Briefly, get it and then upload it (the *.php file) in your wp-content/mu-plugins (if directory does not exists, create) and put the snippet under that directory.

    Let us know if this worked for you.

    Kind regards,

    Alex.