I suggest you ...

JSONP API support

We had to implement a server side PHP proxy to do AJAX based form submissions with HubSpot. If you supported JSON-P then we could just do the submit directly to you correctly without the PHP proxy which would simplify things for us and anyone else who wants full AJAX forms on your site (the form loads via AJAX by default but submissions are still old fashioned POST calls that change the whole page).

You already support JSONP for some of your undocumented JS features. Please add form submission to that and give us a properly documented JavaScript API for HubSpot.

Modern cloud companies offer JS friendly API options. HubSpot should too. You'll see a lot more enthusiastic development and support if you embrace the people who want to do amazing things with your software.

32 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Michael FreemanMichael Freeman shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    3 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • Jonathan KJonathan K commented  ·   ·  Flag as inappropriate

        Hey Michael! I ran into the same issue and created a work-around that you might find useful: https://gist.github.com/hijonathan/9898070

        It's a pretty unsophisticated hack. It adds the actual HubSpot form on the page and manually submits it in the background to a hidden iframe (to stop the redirect).

        This version doesn't tell you whether the form submission was successful, but you could easily do that by injecting the form code into an iframe and listening to url changes via postMessage or something similar. However, if you're just trying to submit a custom form without leaving the page (and maybe doing something special with that form data), this ought to do the trick.

        Enjoy!

      Feedback and Knowledge Base