# 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.

![](/files/qwv7aGEbH6ieeKmgjdr3)

![](/files/LK7VEZQoMh34gUUsxWZJ)

### 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.](/infinite-options/welcome/installing-infinite-options-directly-in-the-theme-1.0-theme.md)

### 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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://shoppad.gitbook.io/infinite-options/styling-and-customizations/change-or-translate-required-pop-up-message-characters-remaining-text.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
