Shopify Form Customization: How to Move Your Signup Button Next to the Email Field

Hey there, fellow store owners and Shopify enthusiasts!

Ever found yourself staring at a perfectly good Shopify form, maybe on your password page or a coming-soon landing page, and thought, "Man, I wish that button wasn't below the email field, but right next to it?" You're definitely not alone. It's a common design preference that can really clean up the look and feel of your forms, making them more intuitive for your customers.

We recently saw a fantastic discussion pop up in the Shopify Community forums where a store owner, nathancondren, was wrestling with this exact challenge. He wanted to move his "SIGN UP" button right alongside the email input on his password page, just like in this visual:

Screenshot 2026-05-22 07.57.19

This seemingly simple CSS tweak turned out to be a bit more complex than just dropping some styles into your theme.scss file. Why? Because of something called the Shadow DOM. Let's dig into what that means for your Shopify store and how the community rallied to find a robust solution.

Understanding the Shadow DOM Challenge

When you're working with modern web components and some of Shopify's newer app embeds, you'll often encounter the Shadow DOM. Think of it as a hidden, encapsulated part of your web page. It's like a mini-document inside your main document, and the important thing is that most of your regular CSS rules from your theme's stylesheet won't apply directly to content living inside this Shadow DOM.

This is exactly what tim_tairli, a helpful community member, pointed out. He explained that Shopify Forms content often lives inside this protected space. So, if you're trying to adjust the layout of a form provided by an app or a specific Shopify component, your usual CSS might just be ignored, leaving you scratching your head.

The Winning Solution: Tapping into window.formStyles

After nathancondren initially tried a solution that didn't quite stick, tim_tairli came back with a refined approach that directly targets how Shopify apps are designed to handle styles within the Shadow DOM. It turns out, there's a neat little trick where app code pulls styles from a global JavaScript object called window.formStyles when the Shadow DOM is created. This is our golden ticket!

Here's how you can implement this solution, based on what ultimately worked for nathancondren:

Step-by-Step Instructions:

  1. Navigate to Your Theme Code: In your Shopify admin, go to Online Store > Themes. Find your current theme, click Actions > Edit code.
  2. Locate Your Form Embed: You'll need to find where your inline form (likely from a Shopify app or a built-in component) is embedded. For nathancondren's case, it was on the password.liquid file, often used for coming-soon pages or store access. The key is to find the section or snippet that renders your Shopify Form.
  3. Add a Custom Liquid Section: Just before your "Shopify Forms" app embed section or the code that renders your form, you'll want to insert a "Custom liquid" section (if you're using theme sections) or directly add this script to the relevant .liquid file. For the password page, this would typically be in password.liquid.
  4. Insert the JavaScript Code: Paste the following code snippet into that "Custom liquid" section or directly into your .liquid file. This script checks if window.formStyles exists, creates it if not, and then sets custom CSS rules for the form element within the Shadow DOM.

In this code:

  • window.formStyles || (window.formStyles = new Map); ensures that the formStyles Map object exists.
  • formStyles.set('custom-form-rules', ...) adds a new set of CSS rules to this Map, which the Shopify Forms component will then adopt.
  • form { flex-direction: row !important; justify-content: center ; } is the magic CSS. It tells the form container to arrange its items (like the email input and the submit button) in a row and center them horizontally. The !important flag ensures these styles override any default styles.

Nathancondren confirmed that this exact approach worked for him, successfully moving his "SIGN UP" button right next to the email field, achieving that sleek, inline look!

An Alternative (Use with Caution): Direct CSS Injection

Another helpful community member, Moeed, offered an alternative solution, which is worth knowing about, though it might be less universally reliable due to the nature of Shadow DOM and potential class name changes.

Moeed's approach involved injecting direct CSS into the password.liquid file, targeting a specific class name that was observed on the form at that time:

Alternative Step-by-Step:

  1. Go to Online Store > Themes > Actions > Edit code.
  2. Find password.liquid file.
  3. Add the following code at the bottom of the file, just above the tag:

This code targets a specific class, _formFieldset_cit2d_82, which might be dynamically generated or specific to a certain app version. While it might work in some cases (Moeed even provided a screenshot of the desired result: image), relying on such specific, potentially volatile class names can be risky for long-term maintainability. The window.formStyles method is generally more robust as it uses a mechanism designed for app integration.

Ultimately, the key takeaway here is that when you're dealing with Shopify Forms and other app-generated content, you might need to go beyond your standard CSS files. Understanding concepts like the Shadow DOM and knowing about specific integration points like window.formStyles can save you a lot of headache.

It's a fantastic example of how the Shopify community comes together to solve tricky problems, sharing insights that go beyond basic theme customization. So, next time you're looking to fine-tune your forms, remember these tricks – they're your secret weapon for a truly polished user experience!

Share:

Use cases

Explore use cases

Agencies, store owners, enterprise — find the migration path that fits.

Explore use cases