How do I create a custom form in Shopify?

Hi, Shopify newbie here. I have some coding experience Ruby on Rails, so don’t afraid to be technical.

I want to create a custom form like a Contact form, wherein I want to collect information from users.

I tried to create a template then I copied the contents of page.contact.liquid template. But there’s an error:

Liquid error: Invalid form type “test_form”, must be one of [“product”, “storefront_password”, “contact”, “customer_login”, “create_customer”, “recover_customer_password”, “reset_customer_password”, “guest_login”, “currency”, “activate_customer_password”, “customer_address”, “new_comment”, “customer”, “localization”, “update_customer_payment_method”]

I’m stucked here. I want to create a form that collects data. After the user submits the form I want it either to be viewable in the Shopify CMS or the data will be sent to an email.

Anyone can help me here?

Hey @user12050 !

The reason why you’re getting a Liquid error is because test_form is an invalid form type. If your goal is to build a basic email submission form, then you will want to use contact for the form type. Here’s some documentation from Shopify with more details:

Hopefully this helps!

HI everyone,

I need to create a custom form for my wholesale buyers to fill in? Any suggestions on how I can create one myself as without paying for an app to do this? The free ones on the Shopify app store always have some kind of watermark promoting their app on my page. Aesthetically it just doesn’t look good or go with my store. I must add I am not code savvy at all. I have tried but, it’s not easy for me. Attached is a form I created with Form Builder by Hulk Apps. I like the typeface and everything about except for “Shopify Forms powered by Hulk Apps” you see at the bottom right. Let me know your thoughts and thank you in advance for your help with this.

Best,

Erik

Did you ever figure this out? I have the same issue

Since Shopify only allows the built-in form types listed in the error message, you won’t be able to create a fully custom form using a new form type like “test_form”; that’s why Liquid throws that validation error.
If you just need to collect data (including custom fields) and have it stored or emailed, the easiest and most flexible solution is to use a dedicated Shopify form builderapp, which lets you:
Create completely custom forms with any fields you want
Store submissions inside your Shopify admin
Send email notifications on every form submission
Add file uploads, dropdowns, checkboxes, multi-step forms, etc.
Embed the form on any page without writing Liquid code

This way, you avoid Shopify’s form-type limitations and get a much more robust solution, especially useful if you’re building anything beyond a basic contact form.