<?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: Form validation / error message + not allow duplicate email in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Form-validation-error-message-not-allow-duplicate-email/m-p/453187#M44679</link>
    <description>&lt;P&gt;I also feel like the first option would avoid more edgecases, while allow you to scale in the future if desired.&lt;/P&gt;</description>
    <pubDate>Wed, 30 Jun 2021 12:21:13 GMT</pubDate>
    <dc:creator>Kevin-C</dc:creator>
    <dc:date>2021-06-30T12:21:13Z</dc:date>
    <item>
      <title>Form validation / error message + not allow duplicate email</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Form-validation-error-message-not-allow-duplicate-email/m-p/452186#M44589</link>
      <description>&lt;P&gt;We have a form where users can ask for a demo account.&lt;/P&gt;&lt;P&gt;- How can we prevent users from submitting form again, with the same email address?&lt;/P&gt;&lt;P&gt;- In Hubspot form setting I have only seen option to redirect to another page OR display a thank you message - is it possible to have both?&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Is it possible to first validate if email can be used, if no - display an error message that this email has already been used?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2021 16:17:04 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Form-validation-error-message-not-allow-duplicate-email/m-p/452186#M44589</guid>
      <dc:creator>ikknd</dc:creator>
      <dc:date>2021-06-28T16:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: Form validation / error message + not allow duplicate email</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Form-validation-error-message-not-allow-duplicate-email/m-p/452737#M44638</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/73772"&gt;@Kevin-C&lt;/a&gt; , &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/91608"&gt;@alyssamwilie&lt;/a&gt; --&amp;gt; any thoughts on these questions?&amp;nbsp; &lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2021 16:00:49 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Form-validation-error-message-not-allow-duplicate-email/m-p/452737#M44638</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2021-06-29T16:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: Form validation / error message + not allow duplicate email</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Form-validation-error-message-not-allow-duplicate-email/m-p/452769#M44642</link>
      <description>&lt;P&gt;I don't believe this is something you can do efficiently with HubL, javascript, or workflows unless the user's cookie stays intact (which is unlikely), so sorry &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/13982"&gt;@dennisedson&lt;/a&gt; but I'm no help here. I'm not an API guru &lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2021 17:12:38 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Form-validation-error-message-not-allow-duplicate-email/m-p/452769#M44642</guid>
      <dc:creator>alyssamwilie</dc:creator>
      <dc:date>2021-06-29T17:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: Form validation / error message + not allow duplicate email</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Form-validation-error-message-not-allow-duplicate-email/m-p/453185#M44678</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/13982"&gt;@dennisedson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hey &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/203651"&gt;@ikknd&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also believe &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/91608"&gt;@alyssamwilie&lt;/a&gt; is correct. But your usecase leads me to believe there might be other options.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm wondering if this has to be an api / validation thing. What if the content on the page the contact is redirected to is conditional?&lt;/P&gt;
&lt;P&gt;Maybe a hidden boolean contact info field in the form. Then on the redirected page query against that field.&lt;/P&gt;
&lt;P&gt;This way we declare what we want to happen based on the contacts info vs checking the submission.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I could also see something like this being done with a serverless function, if you have access to them. But I still feel like the first option might serv you better.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/91608"&gt;@alyssamwilie&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/13982"&gt;@dennisedson&lt;/a&gt;&amp;nbsp; Thoughts?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 12:19:28 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Form-validation-error-message-not-allow-duplicate-email/m-p/453185#M44678</guid>
      <dc:creator>Kevin-C</dc:creator>
      <dc:date>2021-06-30T12:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Form validation / error message + not allow duplicate email</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Form-validation-error-message-not-allow-duplicate-email/m-p/453187#M44679</link>
      <description>&lt;P&gt;I also feel like the first option would avoid more edgecases, while allow you to scale in the future if desired.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 12:21:13 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Form-validation-error-message-not-allow-duplicate-email/m-p/453187#M44679</guid>
      <dc:creator>Kevin-C</dc:creator>
      <dc:date>2021-06-30T12:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: Form validation / error message + not allow duplicate email</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Form-validation-error-message-not-allow-duplicate-email/m-p/453234#M44681</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/73772"&gt;@Kevin-C&lt;/a&gt;&amp;nbsp;Thank you for the suggestions.&lt;/P&gt;&lt;P&gt;I am a bit new to Hubspot integrations, could you clarify which api/validation are you talking about?&lt;/P&gt;&lt;P&gt;Is there API that Hubspot offers, that I could use for email "duplicate" validation?&amp;nbsp; Or is this something that we need to develop by ourselves?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically we need to do the validation before the form is submitted, via javacript?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 13:26:37 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Form-validation-error-message-not-allow-duplicate-email/m-p/453234#M44681</guid>
      <dc:creator>ikknd</dc:creator>
      <dc:date>2021-06-30T13:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: Form validation / error message + not allow duplicate email</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Form-validation-error-message-not-allow-duplicate-email/m-p/453270#M44683</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/73772"&gt;@Kevin-C&lt;/a&gt; They would have to delay the redirect though. I've often run into a problem with trying to use contact properties right after form submission and the submission not having updated the contact quick enough to be usable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/203651"&gt;@ikknd&lt;/a&gt; He's not talking about using the API, but instead using a contact property after form submission to determine what content is shown on the page you redirect to either using HubL or smart content.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't believe Hubspot has any sort of&amp;nbsp; validation available in their API. If you want to validate before/on submission you would need to use the &lt;A href="https://legacydocs.hubspot.com/docs/methods/contacts/get_contact_by_email" target="_blank" rel="noopener"&gt;Contacts API&lt;/A&gt; to get the contact by their email and then you can either search for a property in the form to see if it's filled out or have a list that users are being put into on form submission and see if they're in that list. Then submit the form or show an error depending on if they're in the list/have the property or not. &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/73772"&gt;@Kevin-C&lt;/a&gt; does mention &lt;A href="https://developers.hubspot.com/docs/cms/data/serverless-functions" target="_blank" rel="noopener"&gt;serverless functions&lt;/A&gt;, this would allow you to use the API without an integration but it's an Enterprise only feature.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's about as much as I can tell you. I don't really work with the APIs much. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 14:19:13 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Form-validation-error-message-not-allow-duplicate-email/m-p/453270#M44683</guid>
      <dc:creator>alyssamwilie</dc:creator>
      <dc:date>2021-06-30T14:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: Form validation / error message + not allow duplicate email</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Form-validation-error-message-not-allow-duplicate-email/m-p/453551#M44706</link>
      <description>&lt;P&gt;Yeah I kinda forgot what forum I was in and went on a tanget…&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Back on track!&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The &lt;A href="https://developers.hubspot.com/docs/api/crm/contacts" target="_blank" rel="noopener"&gt;V3 CRM AP&lt;/A&gt;I will return an error if you try to create a contact with a duplicate email address.&lt;/P&gt;
&lt;P&gt;Alternatively using the READ (get) or SEARCH(post) endpoint you could manually compare the values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below I've include a few successful test responses:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;CREATE:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KevinC_2-1625091501959.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/45499i549B7EA3C5A1FF78/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KevinC_2-1625091501959.png" alt="KevinC_2-1625091501959.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;SEARCH:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KevinC_1-1625091463456.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/45498iF2E1ADB1A3A33394/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KevinC_1-1625091463456.png" alt="KevinC_1-1625091463456.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;READ:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KevinC_0-1625091417982.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/45497i16C73F3802BC9BF1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KevinC_0-1625091417982.png" alt="KevinC_0-1625091417982.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 22:19:34 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Form-validation-error-message-not-allow-duplicate-email/m-p/453551#M44706</guid>
      <dc:creator>Kevin-C</dc:creator>
      <dc:date>2021-06-30T22:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Form validation / error message + not allow duplicate email</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Form-validation-error-message-not-allow-duplicate-email/m-p/453565#M44708</link>
      <description>I’m now wondering if we could check if the contact has filled out the form before? I’ll have to get back to this.</description>
      <pubDate>Wed, 30 Jun 2021 22:57:45 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Form-validation-error-message-not-allow-duplicate-email/m-p/453565#M44708</guid>
      <dc:creator>Kevin-C</dc:creator>
      <dc:date>2021-06-30T22:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: Form validation / error message + not allow duplicate email</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Form-validation-error-message-not-allow-duplicate-email/m-p/453670#M44710</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/73772"&gt;@Kevin-C&lt;/a&gt;&amp;nbsp;thank you so much for the help, now I know which direction to take&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 07:28:28 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Form-validation-error-message-not-allow-duplicate-email/m-p/453670#M44710</guid>
      <dc:creator>ikknd</dc:creator>
      <dc:date>2021-07-01T07:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Form validation / error message + not allow duplicate email</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Form-validation-error-message-not-allow-duplicate-email/m-p/453672#M44711</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/91608"&gt;@alyssamwilie&lt;/a&gt;&amp;nbsp;thank you for your help, this has clarified a lot of questions I had&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 07:29:29 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Form-validation-error-message-not-allow-duplicate-email/m-p/453672#M44711</guid>
      <dc:creator>ikknd</dc:creator>
      <dc:date>2021-07-01T07:29:29Z</dc:date>
    </item>
  </channel>
</rss>

