arrow-right cart chevron-down chevron-left chevron-right chevron-up close menu minus play plus search share user email pinterest facebook instagram snapchat tumblr twitter vimeo linkedin youtube subscribe dogecoin dwolla forbrugsforeningen litecoin amazon_payments american_express bitcoin cirrus discover fancy interac jcb master paypal stripe visa diners_club dankort maestro trash

Shopping Cart


qwiq Shopify Section Tips & Tricks

Adding a subject to your Shopify contact form to route multiple forms to different folders or emails


Are you looking to set up multiple email contact forms on your Shopify website, each with its own unique subject line for better organization and response management? While Shopify's default contact form allows only one subject line - which is default with no way to edit it, there's a workaround that involves leveraging rules in your email provider to achieve this. In this tutorial, we'll guide you through the process step by step.

Prerequisites:

  • A Shopify website
  • An email provider that supports rules (e.g., Gmail, Outlook, etc.)
  • Basic knowledge of Shopify, HTML and your email provider's settings

Step 1: Locate the Contact Form Section File

If you're using qwiqode's Flexible Contact Form section you can skip this step since we already provde an option to add this hidden HTML field and add your custom subject line via the Theme Editor.
  1. In your Shopify admin panel, navigate to Online Store > Themes.
  2. Find the theme you're using and click on "Edit code."
  3. Locate the liquid file associated with the contact form you want to modify (usually found under Sections or Templates).
  4. Look for the code block that renders the form fields. This usually looks like this:
    {% form 'contact' %}

  5. Add the following HTML code to create a hidden text field for the subject line:
    <input type="hidden" name="contact[ subject]" value="Your Subject Line Here">

    Replace "Your Subject Line Here" with the desired subject line for this specific form.
    * notice that the word '[ subject]' starts with a space. Keep that space there.
  6. Save your changes.

If you are planning to use multiple forms with different subjects, you'll need to duplicate the section file, rename it and apply the same changes as listed above, but with a different subject line.

Step 2: Configure Email Notifications in Shopify

  1. In your Shopify admin panel, go to Settings > Notifications.
  2. Scroll down to the "Form" section and locate the "Contact form" notification.
  3. Click on "Edit" and ensure that the email address you want to receive form submissions is correctly set.
  4. Save your changes.

Step 3: Set up Rules in Your Email Provider

Now, let's configure rules in your email provider to assign different subject lines based on the form submitted.

Example using Gmail:

  1. Open your Gmail account.
  2. Go to Settings > See all settings.
  3. Navigate to the "Filters and Blocked Addresses" tab.
  4. Click on "Create a new filter."
  5. In the "From" field, enter the email address associated with your Shopify notifications.
  6. In the "Has the words" field, enter the Subject Line that you entered for the specific form.
  7. Click on "Create filter."
  8. Check the box(es) that you want as actions to take when a match has occurred.
  9. Click on "Create filter."

Example using Outlook:

  1. Open your Outlook account.
  2. Go to Settings > View all Outlook settings.
  3. Navigate to Mail > Rules.
  4. Click on "Add new rule."
  5. Under "Add a condition" select "From" and enter the email address associated with your Shopify notifications.
  6. Click on "Add another condition" and select 'Message body includes" and enter the Subject Line that you entered for the specific form.
  7. Under "Add an action," select the actions to take when a match has occurred.
  8. Click on "Save."

Step 4: Test Your Contact Forms

Once you've configured the rules in your email provider, it's time to test your contact forms on your Shopify website. Fill out each form and verify that the emails are being received as you configured.

Conclusion:

By following this workaround, you can create multiple email contact forms on your Shopify website and be able to distribute each separate inquiry to the relevant recipient or location using rules in your email provider. This allows for better organization and makes it easier to manage responses based on the form submitted.

We hope this tutorial has been helpful in enhancing the functionality of your Shopify contact forms. If you have any questions or encounter any issues, feel free to reach out for assistance. Happy form building!

Shop The Article