<?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: Global form events not working in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Global-form-events-not-working/m-p/848860#M67402</link>
    <description>&lt;P&gt;Helllo&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/630690"&gt;@CLoder&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I don't believe the callback params have changed, Also these are just callbacks and don't act as a data modifier before actual submission.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will have to create a form, add your own logic through javascript and use this API to submit the values: &lt;A href="https://legacydocs.hubspot.com/docs/methods/forms/submit_form" target="_blank"&gt;https://legacydocs.hubspot.com/docs/methods/forms/submit_form&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have any doubts, please do ask&lt;/P&gt;</description>
    <pubDate>Wed, 13 Sep 2023 12:42:39 GMT</pubDate>
    <dc:creator>himanshurauthan</dc:creator>
    <dc:date>2023-09-13T12:42:39Z</dc:date>
    <item>
      <title>Global form events not working</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Global-form-events-not-working/m-p/848502#M67361</link>
      <description>&lt;P&gt;Is there new documenation for global form events? The &lt;A href="https://legacydocs.hubspot.com/docs/methods/forms/advanced_form_options" target="_blank" rel="noopener"&gt;old documentation&lt;/A&gt; is incorrect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For context, I'm trying to use the&amp;nbsp;onFormSubmit to update hidden values:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;onBeforeFormSubmit: (form, vals) =&amp;gt; {
  const data = calculateDat();
  vals = [...vals, {name: "type", values: data}];
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Acc. to the documentation, `form` should be a JQuery object. It's not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using Svelte, and don't want to inject jQuery for one thing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to update a hidden input with some calculated data?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 20:09:20 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Global-form-events-not-working/m-p/848502#M67361</guid>
      <dc:creator>CLoder</dc:creator>
      <dc:date>2023-09-12T20:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: Global form events not working</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Global-form-events-not-working/m-p/848860#M67402</link>
      <description>&lt;P&gt;Helllo&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/630690"&gt;@CLoder&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I don't believe the callback params have changed, Also these are just callbacks and don't act as a data modifier before actual submission.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will have to create a form, add your own logic through javascript and use this API to submit the values: &lt;A href="https://legacydocs.hubspot.com/docs/methods/forms/submit_form" target="_blank"&gt;https://legacydocs.hubspot.com/docs/methods/forms/submit_form&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have any doubts, please do ask&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 12:42:39 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Global-form-events-not-working/m-p/848860#M67402</guid>
      <dc:creator>himanshurauthan</dc:creator>
      <dc:date>2023-09-13T12:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: Global form events not working</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Global-form-events-not-working/m-p/849085#M67416</link>
      <description>&lt;P&gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt;don't act as a data modifier before actual submission.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Well that's a bummer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the docs give an example:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Examples:
$('input[value="checkbox_1"]').prop('checked', true).change();
$('input[name="firstname"]').val('Brian').change(); 
    
If not using jQuery:
input.value = value;
input.dispatchEvent(new Event('input', { bubbles: true }));

For Checkboxes:
input.click()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What's the point of that then? Does it only allow me to update values while the form is rendered?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 17:25:40 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Global-form-events-not-working/m-p/849085#M67416</guid>
      <dc:creator>CLoder</dc:creator>
      <dc:date>2023-09-13T17:25:40Z</dc:date>
    </item>
  </channel>
</rss>

