Contact

A professional contact form with optional Google Maps integration. Capture customer inquiries with customizable fields and styling.

πŸ“ sections/contact.liquid⏱️ 5 min setup

Overview

The Contact section makes it easy for customers to reach you. It includes form validation, spam protection, and optional map integration.

πŸ“

Custom Fields

Name, email, phone, message
πŸ—ΊοΈ

Map Integration

Google Maps or static image
πŸ›‘οΈ

Spam Protection

Honeypot and validation
πŸ“§

Email Notifications

Direct to your inbox

When to Use

  • Contact page β€” Primary use case for customer inquiries
  • About page β€” Combined with company information
  • Store locator page β€” With map integration

Quick Setup

Add Contact Form in 3 Steps

  1. 1Create a new page in Shopify admin and assign the Contact template
  2. 2In the Theme Editor, customize the Contact section
  3. 3Optionally add a Map using Google Maps or a static image

Section Settings

Map

SettingTypeDefaultDescription
Google Maps API keytext-Your Google Maps Embed API key. Required for interactive map.
Map querytext-Location search query (e.g., '123 Main St, New York, NY' or business name).
Map linkurl-Link to open when clicking the map. Usually a Google Maps URL.
Desktop imageimage-Static map image for desktop (used when no API key is provided).
Mobile imageimage-Optimized map image for mobile screens.

πŸ’‘ Map Options:
β€’ Interactive map β€” Requires Google Maps API key
β€’ Static image β€” Upload a screenshot of your location (no API key needed)
β€’ No map β€” Leave all map fields empty

Form Labels

Customize the form field labels and placeholders:

SettingTypeDefaultDescription
HeadingtextPage titleSection heading. Defaults to the page title if left empty.
Name labeltextNameLabel for the name field.
Name placeholdertextJohn DoePlaceholder text for the name field.
Email labeltextEmailLabel for the email field.
Email placeholdertextyou@example.comPlaceholder text for the email field.
Phone labeltextPhoneLabel for the phone field.
Phone placeholdertext+1 (555) 555-5555Placeholder text for the phone field.
Message labeltextMessageLabel for the message textarea.
Message placeholdertextHow can we help?Placeholder text for the message field.
ButtontextSendSubmit button label.

Spacing

SettingTypeDefaultDescription
Desktop top/bottomrange0pxMargins on desktop.
Mobile top/bottomrange0pxMargins on mobile.

Google Maps Setup

To use an interactive Google Map:

Step 1: Get an API Key

  1. Go to Google Cloud Console
  2. Create a new project (or select existing)
  3. Enable the Maps Embed API
  4. Create credentials β†’ API Key
  5. Restrict the key to your domain for security

Step 2: Configure the Section

  1. Paste your API key in the Google Maps API key field
  2. Enter your location in Map query (e.g., "123 Main Street, New York, NY")
  3. Add a Map link pointing to your Google Maps business listing

⚠️ API Key Security: Always restrict your API key to your store's domain(s) in the Google Cloud Console to prevent unauthorized usage.


Form Submission Behavior

How It Works

  1. Customer fills out the form
  2. Form submits to Shopify's built-in contact form handler
  3. Email is sent to your store's customer service email
  4. Success message displays to the customer

Where Submissions Go

Contact form submissions are sent to the email address configured in Shopify Admin β†’ Settings β†’ Store details β†’ Store contact email.

Viewing Submissions

You can also view submissions in Settings β†’ Notifications β†’ Customer notifications β†’ Contact customer.


Best Practices

Form Design

  1. Keep it simple β€” The default fields cover most needs
  2. Use clear labels β€” Avoid jargon or abbreviations
  3. Set helpful placeholders β€” Show examples of expected input
  4. Test the form β€” Submit a test message to verify delivery

Map Usage

  1. Interactive maps look professional β€” Worth the API setup
  2. Static images work too β€” A simple screenshot with a link is effective
  3. Include a Map link β€” Let customers open in Google Maps for directions

Accessibility

  • All form fields have proper labels
  • Error messages are clear and helpful
  • Success messages confirm submission
  • Form works with keyboard navigation

Troubleshooting

Form submissions not received

  • Check your store's contact email in Shopify Settings
  • Verify email isn't going to spam
  • Ensure customer email notifications are enabled

Map not displaying

  • Verify API key is correct and active
  • Check that Maps Embed API is enabled in Google Cloud
  • Ensure map query returns a valid location
  • Try using static images as a fallback

Form shows errors

  • Required fields must be filled out
  • Email must be valid format
  • Check for special characters that may cause issues

Success message not showing

  • Form must submit without errors
  • Page should scroll to show the success message
  • Check for JavaScript errors in browser console