Drip opt-in form integration to shopify

roeydesigns
New Member
2 0 0

Hello shopify users,

 

So I've been trying to integrate my drip opt-in form to my shopify store but it shows an error, I've researched about it and I think it has to do with the API. I'm quite new on using shopify. But this opt-in form works well with my wordpress website. Shopify shows that It has been blocked by CORS policy but I tried re-creating this with other platform and it works well. Only shopify shows this error:

"Access to XMLHttpRequest at 'https://www.getdrip.com/forms/XXXXXXXXX/submissions' from origin 'https://mywebsite.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource."

 

This discussion is also related to this discussion but no one answers it:

https://community.shopify.com/c/Shopify-Discussion/How-to-embed-an-opt-in-form-made-in-Drip-to-a-spe...

 

My code is similar to this one:

<form action="https://www.getdrip.com/forms/184995559/submissions" method="post" data-drip-embedded-form="184995559">
<h3 data-drip-attribute="headline">Spring Cleanse 2020</h3>
<div data-drip-attribute="description"></div>
<div>
<label for="drip-email">Email Address</label><br>
<input type="email" id="drip-email" name="fields[email]" value="">
</div>
<div style="display: none;" aria-hidden="true">
<label for="website">Website</label><br>
<input type="text" id="website" name="website" tabindex="-1" autocomplete="false" value="">
</div>
<div>
<input type="submit" value="Sign Up" data-drip-attribute="sign-up-button">
</div>
</form>

On what I've researched. I think I need to somehow create an API about this? and I don't know how to do this since this is just a simple form with an action that will redirect to drip. Can someone help me with this one please.

 

Thank you in advance.

0 Likes