I need to embed a form to a page on Shopify, but I can’t figure out how to get it to display correctly. I’ve tested it on a Wordpress site to make sure the code is correct and it displays correctly there. Any advice?
Topic summary
A user is attempting to embed a custom form on a Shopify page but cannot get it to display properly, despite the same code working correctly on WordPress. A screenshot shows the implementation issue.
Suggested Solutions:
- Use Shopify’s built-in “Custom Liquid,” “Custom Code,” or “Custom HTML” sections within the theme
- Create a new Page and paste code in HTML view (accessed via the <> button)
- Implement forms using Shopify’s Liquid templating language syntax (specifically the
formtag) - Debug locally to identify specific errors
Current Status:
The issue remains unresolved. The original poster suspects the problem may be related to inline JavaScript in the code. No page link has been shared yet for further troubleshooting.
Depending on your theme, you can use section called “Custom Liquid” or “Custom Code” or “Custom HTML”.
Paste your code in this section relevant setting.
Alternatively, you can create a new Page and when editing page content, press the <> button.
Your content entry will change to HTML view – paste your code there, save and preview.
Share a link to the page where you’ve implemented the code for further help. (preview password as well if one is set).
There are specific methods to implement forms on a Shopify theme. For this you need to use the syntax of Liquid templating language. Read more here https://shopify.dev/docs/api/liquid/tags/form
Also, there could be more factors so you should debug it locally searching for specific errors.
I did try that, but the form won’t display. I think it may be because the code is inline JavaScript after doing some more digging?
