APIs & Integrations

kd1988
Member

Custom Check Email Already Exists in Form

SOLVE

Hi,

How i can check "Email Already Exists" through from submission.

0 Upvotes
1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Custom Check Email Already Exists in Form

SOLVE

Hi @kd1988,

HubSpot forms and the Forms API do not support this functionality out of the box.

To do this, you would need to query HubSpot contacts with either this or this endpoint. Since these endpoints do not support CORS AJAX requests, however, you would first have to ping your external server and add authentication for these calls to HubSpot.

Considering the complexity of this setup, I recommend creating a custom form and using the Forms API rather than a native or embedded HubSpot form.

Isaac Takushi

Associate Certification Manager

View solution in original post

0 Upvotes
5 Replies 5
IsaacTakushi
HubSpot Employee
HubSpot Employee

Custom Check Email Already Exists in Form

SOLVE

Hi @kd1988,

No, it is not possible to turn off automatic SSL forwarding ("Require HTTPS") for individual pages. It is possible to turn it off for the entire subdomain, but this would still not prevent some visitors from loading the page over HTTPS.

The most sustainable solution will be to configure your endpoint for HTTPS requests.

Isaac Takushi

Associate Certification Manager
0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Custom Check Email Already Exists in Form

SOLVE

Hi @kd1988,

Is your form embedded on an HTTPS page?

If so, you aren't able to make HTTP AJAX requests due to the same-origin policy.

As this Stack Overflow discussion confirms, this behavior is not exclusive to HubSpot forms.

Your endpoint must allow HTTPS requests to work from HTTPS pages.

Isaac Takushi

Associate Certification Manager
0 Upvotes
kd1988
Member

Custom Check Email Already Exists in Form

SOLVE

Hi @Isaac_Takushi,

Can i have disable/remove HTTPS for particular page?

Thanks

0 Upvotes
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Custom Check Email Already Exists in Form

SOLVE

Hi @kd1988,

HubSpot forms and the Forms API do not support this functionality out of the box.

To do this, you would need to query HubSpot contacts with either this or this endpoint. Since these endpoints do not support CORS AJAX requests, however, you would first have to ping your external server and add authentication for these calls to HubSpot.

Considering the complexity of this setup, I recommend creating a custom form and using the Forms API rather than a native or embedded HubSpot form.

Isaac Takushi

Associate Certification Manager
0 Upvotes
kd1988
Member

Custom Check Email Already Exists in Form

SOLVE

Hi @Isaac_Takushi,

I have call AJAX request OnClick submit button but i got one issue...In Ajax URL automatically changed HTTP to HTTPS. For example

$.ajax({
type: 'GET',
url: "http://mydomain.com/",
data: formData,
success:function(data){
console.log(data);
}
});

But in case of request it's automatically changed URL http to https like https://mydomain.com/.

Thanks

0 Upvotes