May 28, 2020 1:42 PM
I need to have a form in my php page and this form is created in the hubspot. I have seen two options like embed the code (where we use a script and place this script below the html) and share link (where we will use this link for the form). I had tried with embed code and the form got displayed in the frontend. I think we need to do custom styling.
My question is, is it possible to render the form by some api calls directly?? I had tried with " https://api.hubapi.com/forms/v2/forms/1eae3941-9ce8-411d-8b91-87a92c0c9d5c/?hapikey=demo" . But it is returning json output and not the form display.
Whether it will be possble to render the form as we get with embed code method, by calling an api???
Can someone help please??
May 29, 2020 10:36 AM
Thanks for reaching out.
It is not possible to retrieve a HubSpot form's HTML source code directly via an API request. The endpoint you used is the closest you can get.
fields and then send the submission to this endpoint.
Alternatively, it might be simpler to just create a custom HTML form which has the same fields as the HubSpot form and use this endpoint to send the submissions to the HubSpot form.
Isaac TakushiAssociate Certification Manager
May 31, 2020 10:26 AM
Thank you. Very clearly explained.
Mine is a multilanguage site and the changes done to the hubspot form must reflect into my website form. This is what my requirement is.
So which will be the better way to accomplish this?
a) Using embed script code. So for each language we create translation of the form and use the respective forms in each language
b) using the api and build the form from php.
And one more thing,
If it is a multilanguage site, is there any other options available other than creating separate forms in each language??
Thank you in advance