# How to Change or Translate Required Pop-Up Messages and “Characters Remaining” Text

{% embed url="<https://www.youtube-nocookie.com/embed/SSx2BBuBGaI?rel=0>" %}

You can customize the required field error messages and the “**Characters remaining**” text shown by Infinite Options by adding a small code snippet to your Shopify theme.

This allows you to:

* Translate messages
* Match your store’s tone and language
* Clarify required field instructions

This only affects Infinite Options validation messages. It does not change Shopify’s default product form behavior.

![](https://24152052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FglwgaFVh2VmGBjtIbnDb%2Fuploads%2Fgit-blob-cbc4b17995a587668c7bbd867a406a790a7a011d%2Fdocsassets555e25e4e4b027e1978e1c9aimages67d3a376f9d2af0629995411file-lvowjmlkep.png?alt=media)

![](https://24152052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FglwgaFVh2VmGBjtIbnDb%2Fuploads%2Fgit-blob-6f3396bdee2ba5e46555754a19ec6be321b75c76%2Fdocsassets555e25e4e4b027e1978e1c9aimages67d3a4344cb91c68993d8d56file-dobadrne3s.png?alt=media)

### Where to Add the Code in Shopify

1. From your Shopify admin, go to **Online Store → Themes**
2. Click **Edit code**
3. Open your product template file\
   This is usually named `product.liquid` or `main-product.liquid`
4. Scroll to the bottom of the file
5. Paste the snippet you selected below
6. Click **Save**

{% hint style="info" %}
If you’re using a Shopify 2.0 theme, paste the snippet **above the `{% schema %}` line**.
{% endhint %}

Use only one snippet at a time.

If you’re unsure which file is your product template, see this[ guide for help locating it.](https://shoppad.gitbook.io/infinite-options/welcome/installing-infinite-options-directly-in-the-theme-1.0-theme)

### Choose the Text You Would Like to Change

#### Change “Characters Remaining” Only

Use this if you only want to update the “Characters remaining” message.

```html
<script>
window.Shoppad = window.Shoppad || {};
window.Shoppad.apps = window.Shoppad.apps || {};
window.Shoppad.apps.infiniteoptions = window.Shoppad.apps.infiniteoptions || {};
window.Shoppad.apps.infiniteoptions.strings = window.Shoppad.apps.infiniteoptions.strings || {};

window.Shoppad.apps.infiniteoptions.strings.charactersRemaining = "Characters remaining";
</script>
```

Replace `"Characters remaining"` with your own text.

Example:

```
"Caractères restants"
```

#### Change Text Field Required Message Only

Use this if you only want to change the required error message for text input fields.

```html
<script>
window.Shoppad = window.Shoppad || {};
window.Shoppad.apps = window.Shoppad.apps || {};
window.Shoppad.apps.infiniteoptions = window.Shoppad.apps.infiniteoptions || {};
window.Shoppad.apps.infiniteoptions.strings = window.Shoppad.apps.infiniteoptions.strings || {};
window.Shoppad.apps.infiniteoptions.strings.errorMessages = window.Shoppad.apps.infiniteoptions.strings.errorMessages || {};

window.Shoppad.apps.infiniteoptions.strings.errorMessages.forTextInputs =
  "Please enter your text before adding this item to cart.";
</script>
```

Edit the sentence inside the quotation marks.

#### Change All Required Messages

Use this if you want to customize validation messages for:

* Text inputs
* Number inputs
* Checkboxes
* Minimum selections
* Dynamic checkout buttons
* Dropdown menus

```html
<script>
window.Shoppad = window.Shoppad || {};
window.Shoppad.apps = window.Shoppad.apps || {};
window.Shoppad.apps.infiniteoptions = window.Shoppad.apps.infiniteoptions || {};

window.Shoppad.apps.infiniteoptions.strings = {
  charactersRemaining: "Characters remaining",
  errorMessages: {
    forTextInputs: "Please enter your text before adding this item to cart.",
    forNumberInputs: "Please enter a number before adding this item to cart.",
    forCheckboxes: "Please select your options before adding this item to cart.",
    forMinimumValues: "Please select at least %valuesmin options before adding this item to cart.",
    forDynamicCheckout: "Please add the item to your cart before using this checkout option.",
    forDropdowns: "Please select an option before adding this item to cart."
  }
};
</script>
```

You can edit any sentence inside the quotation marks.

`%valuesmin` will automatically be replaced with the required number.

### If Your Changes Don’t Appear

* Clear your browser cache
* Confirm the snippet is inside your product template file
* Make sure it is placed above `{% schema %}` in Shopify 2.0 themes
