<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Forms and Angular in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Forms-and-Angular/m-p/325002#M31357</link>
    <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/119471"&gt;@GerardRosetta&lt;/a&gt;&amp;nbsp;one tweak made it work for me - just replace the shell.js import with this instead:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;&amp;lt;script &lt;/SPAN&gt;&lt;SPAN&gt;type&lt;/SPAN&gt;&lt;SPAN&gt;="text/javascript"&lt;BR /&gt;&lt;/SPAN&gt;        &lt;SPAN&gt;charset&lt;/SPAN&gt;&lt;SPAN&gt;="UTF-8"&lt;BR /&gt;&lt;/SPAN&gt;        &lt;SPAN&gt;src&lt;/SPAN&gt;&lt;SPAN&gt;="https://js.hsforms.net/forms/v2.js"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Thanks anonymous person for pointing out that we could use the AfterViewInit hook to accomplish this!&lt;/P&gt;</description>
    <pubDate>Tue, 10 Mar 2020 14:45:27 GMT</pubDate>
    <dc:creator>bsplosion</dc:creator>
    <dc:date>2020-03-10T14:45:27Z</dc:date>
    <item>
      <title>Forms and Angular</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Forms-and-Angular/m-p/231224#M10120</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am trying to embed HubSpot form on our website, but it doesn’t show up.&lt;BR /&gt;
Does it work with angular?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 18:58:30 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Forms-and-Angular/m-p/231224#M10120</guid>
      <dc:creator />
      <dc:date>2017-11-20T18:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: Forms and Angular</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Forms-and-Angular/m-p/231225#M10121</link>
      <description>&lt;P&gt;Hi &lt;A class="mention" href="https://community.hubspot.com/u/mirielle"&gt;@Mirielle&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;The form embed code is loaded via javascript, so in theory it should work. Can you send me a link to the page where the form isn’t appearing correctly?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2017 19:22:56 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Forms-and-Angular/m-p/231225#M10121</guid>
      <dc:creator>Derek_Gervais</dc:creator>
      <dc:date>2017-11-21T19:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Forms and Angular</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Forms-and-Angular/m-p/231226#M10122</link>
      <description>&lt;P&gt;Angular2+ deletes all script tags within component markup due to security limitations.&lt;/P&gt;
&lt;P&gt;I am currently working on finding a solution to integrate HubSpot with angular2+, however the HS blogs have effectively glossed-over any information on the subject from Google.&lt;/P&gt;
&lt;P&gt;The best avenue I've found so far is by using angular's Http to post to the hubspot endpoint, in a similar method to what's found here: &lt;A href="https://stackoverflow.com/questions/35180562/i-need-to-do-a-http-request-to-a-mail-chimp-subscription-list-via-a-component-po/35181085#35181085" rel="nofollow noopener" target="_blank"&gt;https://stackoverflow.com/questions/35180562/i-need-to-do-a-http-request-to-a-mail-chimp-subscription-list-via-a-component-po/35181085#35181085&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;It would be extremely nice of the &lt;A class="mention" href="https://community.hubspot.com/u/hubspot" target="_blank"&gt;@hubspot&lt;/A&gt; team to figure out a solution for people using Angular, Ionic, etc&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 14:32:04 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Forms-and-Angular/m-p/231226#M10122</guid>
      <dc:creator>AaronSmileRight</dc:creator>
      <dc:date>2020-08-17T14:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: Forms and Angular</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Forms-and-Angular/m-p/231227#M10123</link>
      <description>&lt;P&gt;Hi &lt;A class="mention" href="https://community.hubspot.com/u/aaronsr"&gt;@AaronSR&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;Your best bet is likely to create your own custom form and submit to HubSpot via the Forms API. The form embed code was built to be plug-and-play on standard websites, but not necessarily with all frontend frameworks. With the forms API, you can have full control over the form in Angular while still being able to pass the data into HubSpot:&lt;/P&gt;
&lt;ASIDE class="onebox whitelistedgeneric"&gt;
  &lt;HEADER class="source"&gt;
      &lt;IMG src="https://community.hubspot.com/legacyfs/online/uploads/default/original/1X/46c7134e5c588b9723986216fcb862e4f64d25e8.png" class="site-icon" width="16" height="16" /&gt;
      &lt;A href="https://developers.hubspot.com/docs/methods/forms/submit_form" target="_blank"&gt;developers.hubspot.com&lt;/A&gt;
  &lt;/HEADER&gt;
  &lt;ARTICLE class="onebox-body"&gt;
    

&lt;H3&gt;&lt;A href="https://developers.hubspot.com/docs/methods/forms/submit_form" target="_blank"&gt;Submit data to a form | HubSpot Forms API&lt;/A&gt;&lt;/H3&gt;

&lt;P&gt;POST  https://forms.hubspot.com/uploads/form/v2/:portal_id/:form_guid - Send form submission data to HubSpot. Form submissions from external sources can be made to any registered HubSpot form. You can see a list of forms on your portal by going to...&lt;/P&gt;


  &lt;/ARTICLE&gt;
  &lt;DIV class="onebox-metadata"&gt;
    
    
  &lt;/DIV&gt;
  &lt;DIV style="clear: both"&gt;&lt;/DIV&gt;
&lt;/ASIDE&gt;</description>
      <pubDate>Wed, 18 Apr 2018 22:53:43 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Forms-and-Angular/m-p/231227#M10123</guid>
      <dc:creator>Derek_Gervais</dc:creator>
      <dc:date>2018-04-18T22:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Forms and Angular</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Forms-and-Angular/m-p/231228#M10124</link>
      <description>&lt;P&gt;Well, I hope you might have already figured this out. But this might be helpful for people who are looking further. I had the same requirement and this is how I did it and it's working perfectly.&lt;/P&gt;
&lt;P&gt;In Index.html:&lt;BR /&gt;
&amp;lt; script charset="utf-8" type="text/javascript" src="&lt;A href="https://js.hsforms.net/forms/shell.js" rel="nofollow noopener"&gt;https://js.hsforms.net/forms/shell.js&lt;/A&gt;"&amp;gt;&lt;/P&gt;
&lt;P&gt;In Template:&lt;BR /&gt;
&amp;lt; div id="hubspotForm"&amp;gt;&lt;/P&gt;
&lt;P&gt;In Component:&lt;/P&gt;
&lt;P&gt;declare var hbspt: any // put this at the top&lt;/P&gt;
&lt;P&gt;ngAfterViewInit(){&lt;BR /&gt;
hbspt.forms.create({&lt;BR /&gt;
portalId: "[YOUR-PORTAL-ID]",&lt;BR /&gt;
formId: "[YOUR-FORM-ID]",&lt;BR /&gt;
target: "&lt;SPAN class="hashtag"&gt;#hubspotForm&lt;/SPAN&gt;"&lt;BR /&gt;
});&lt;BR /&gt;
window.scrollTo(0, 0); // used this because the scroll position is not at the top after inserting the form, so i'm manually pushing it &lt;IMG src="https://community.hubspot.com/legacyfs/online/emojis/twitter/wink.png?v=6" title=":wink:" class="emoji" alt=":wink:" /&gt;&lt;BR /&gt;
}&lt;/P&gt;
&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2018 02:31:36 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Forms-and-Angular/m-p/231228#M10124</guid>
      <dc:creator />
      <dc:date>2018-09-11T02:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: Forms and Angular</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Forms-and-Angular/m-p/317820#M30467</link>
      <description>&lt;P&gt;I'm getting this error: "hbspt.forms.create is not a function" with Angular 7&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Index.html&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;&amp;lt;script charset="utf-8" src="https://js.hsforms.net/forms/shell.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;home.component.ts&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;declare var hbspt: any // put this at the top&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;  ngAfterContentInit() {
    hbspt.forms.create({
      portalId: "xxxxxx",
      formId: "xxxxxx",
      target: "#hubspotForm"
    });
  }&lt;/PRE&gt;home.component.html&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;&amp;lt;div id="hubspotForm"&amp;gt; &amp;lt;/div&amp;gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 10 Feb 2020 10:23:13 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Forms-and-Angular/m-p/317820#M30467</guid>
      <dc:creator>GerardRosetta</dc:creator>
      <dc:date>2020-02-10T10:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: Forms and Angular</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Forms-and-Angular/m-p/325002#M31357</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/119471"&gt;@GerardRosetta&lt;/a&gt;&amp;nbsp;one tweak made it work for me - just replace the shell.js import with this instead:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;&amp;lt;script &lt;/SPAN&gt;&lt;SPAN&gt;type&lt;/SPAN&gt;&lt;SPAN&gt;="text/javascript"&lt;BR /&gt;&lt;/SPAN&gt;        &lt;SPAN&gt;charset&lt;/SPAN&gt;&lt;SPAN&gt;="UTF-8"&lt;BR /&gt;&lt;/SPAN&gt;        &lt;SPAN&gt;src&lt;/SPAN&gt;&lt;SPAN&gt;="https://js.hsforms.net/forms/v2.js"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Thanks anonymous person for pointing out that we could use the AfterViewInit hook to accomplish this!&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 14:45:27 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Forms-and-Angular/m-p/325002#M31357</guid>
      <dc:creator>bsplosion</dc:creator>
      <dc:date>2020-03-10T14:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: Forms and Angular</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Forms-and-Angular/m-p/348407#M34158</link>
      <description>&lt;P&gt;Hi I would like to know how integrate HubSpot Chat with Angular2 project.&lt;/P&gt;&lt;P&gt;Many people suggest to use chat form on client side and send post request to hubspot API. Are there any suggestions or examples to do this?&lt;/P&gt;&lt;P&gt;Many thanks Yuriy&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2020 06:50:24 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Forms-and-Angular/m-p/348407#M34158</guid>
      <dc:creator>PaulEsprit</dc:creator>
      <dc:date>2020-06-19T06:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: Forms and Angular</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Forms-and-Angular/m-p/348514#M34162</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/142"&gt;@Derek_Gervais&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/107916"&gt;@bsplosion&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/66274"&gt;@WendyGoh&lt;/a&gt;&amp;nbsp;would you have any suggestions for&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/135869"&gt;@PaulEsprit&lt;/a&gt;?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2020 14:01:24 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Forms-and-Angular/m-p/348514#M34162</guid>
      <dc:creator>JessicaH</dc:creator>
      <dc:date>2020-06-19T14:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: Forms and Angular</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Forms-and-Angular/m-p/354990#M34851</link>
      <description>&lt;P&gt;When trying to use&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;hubspot.forms.create&lt;/PRE&gt;&lt;P&gt;I get an undefined for the forms object&lt;/P&gt;&lt;P&gt;And this is what I see when I inspect the hubspot object&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hubspot_object.PNG" style="width: 722px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/29310iD3C6997F649B5602/image-size/large?v=v2&amp;amp;px=999" role="button" title="hubspot_object.PNG" alt="hubspot_object.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 16:03:39 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Forms-and-Angular/m-p/354990#M34851</guid>
      <dc:creator>FelixPrados</dc:creator>
      <dc:date>2020-07-16T16:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: Forms and Angular</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Forms-and-Angular/m-p/367899#M36264</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/138937"&gt;@FelixPrados&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just add 'typings.d.ts' into your angular app and add the declaration there.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;declare&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;const&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;hbspt:&amp;nbsp;any;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;No need to declare any variables on the component.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Embed code will work once you add this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Happy coding !!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;'&lt;/P&gt;</description>
      <pubDate>Sun, 06 Sep 2020 15:24:22 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Forms-and-Angular/m-p/367899#M36264</guid>
      <dc:creator>sumith1596</dc:creator>
      <dc:date>2020-09-06T15:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: Forms and Angular</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Forms-and-Angular/m-p/957934#M72646</link>
      <description>&lt;P&gt;Angular 12 o superiores&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;En index.html de tu proyecto&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; &amp;lt;script type="text/javascript" charset="UTF-8" src="https://js.hsforms.net/forms/v2.js"&amp;gt;&amp;lt;/script&amp;gt; &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;En el componente donde quieras que esté el formulario&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;declare var hbspt: any // pega esto arriba del componente &lt;/LI-CODE&gt;&lt;P&gt;Esto en el componente como tal&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;ngAfterContentInit() { 
 hbspt.forms.create({ 
  region: "xxx", 
  portalId: "xxxxxxxx", 
  formId: "xxxxxxxxx", 
  target: "#hubspotForm" 
 }); 
} &lt;/LI-CODE&gt;&lt;P&gt;Y esto en tu html&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;div class="col-12 mb-5"&amp;gt; 
  &amp;lt;div id="hubspotForm"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt; &lt;/LI-CODE&gt;&lt;P&gt;Con esto tu formulario debe funcionar en Angular 12 o superiores&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 15:03:39 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Forms-and-Angular/m-p/957934#M72646</guid>
      <dc:creator>devlucho</dc:creator>
      <dc:date>2024-04-10T15:03:39Z</dc:date>
    </item>
  </channel>
</rss>

