skip to Main Content

There is no code here,
I am just having a problem trying to find out how to make my contact us page functional inside my shopify app.

This link https://help.shopify.com/en/manual/online-store/os/using-themes/change-the-layout/add-contact-form explains how to create contact page in shopify. But I am creating a shopify app using nextjs and I am having my own contact us page. The issue is that I can not find in the docs how to integrate that page with shopify API so that the merchant receives emails from the customers through it.

2

Answers


  1. In the docs there is an example of the form output:

    <form accept-charset="UTF-8" action="/contact" class="contact-form" method="post">
      <input name="form_type" type="hidden" value="contact" />
      <input name="utf8" type="hidden" value="✓" />
      ...
    </form>
    

    Note the post action here – you should be able to post to /contact to post the contact form data.

    Login or Signup to reply.
  2. You cannot post a form on a Shopify Page resource to your own custom App. That is just not allowed. You do have two choices. You can inject a script tag into the Page which will run some Javascript that could contact your App, or your App can setup an App Proxy, and then you place callbacks from your form on a Page to your App that way.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search