> For the complete documentation index, see [llms.txt](https://help.mimeeq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.mimeeq.com/platform/custom-fields/single-line-text-field.md).

# Single-Line Text Field

Collect short text in the Basket or store it on Option Sets for SKU and price codes. Learn how to create a single-line text field.

A single-line text field can be used for both Baskets and Option Sets. For Baskets, it appears as an input field where customers can provide additional information, such as a short note. For Option Sets, this field is visible in the admin panel within the Option Set. You can later use this information as a dynamic value in different areas, such as SKU codes or Price Codes.

{% hint style="info" %}
Your account type and plan may limit the number of custom fields you can create.
{% endhint %}

***

## Create a single-line text field

{% stepper %}
{% step %}

### Open Custom Fields

Go to **Settings**, find **Custom Fields** under the **Data** section, and click **New Custom Field**.
{% endstep %}

{% step %}

### Set the scope and type

Set **Field Scope** to **Basket** or **Option Set** and select **Type**: **Single-line text**.
{% endstep %}

{% step %}

### Fill in the field details

Provide the remaining required information.

<table><thead><tr><th width="60">#</th><th>Setting</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td><strong>Name</strong></td><td>The name for the single-line text custom field. Required.</td></tr><tr><td>2</td><td><strong>ID</strong></td><td>Automatically generated ID from the name in a URL-friendly format. Required.</td></tr><tr><td>3</td><td><strong>Field Scope</strong></td><td>Basket or Option Set. Required.</td></tr><tr><td>4</td><td><strong>Type</strong></td><td>Single-line text. Required.</td></tr><tr><td>5</td><td><strong>Regex Regular Expression</strong></td><td>A pattern used to validate the format of text entered by the user. For example, you can use a regular expression to restrict input to only letters. Optional.</td></tr><tr><td>6</td><td><strong>Description</strong></td><td>A description of the custom field, which can be used to provide additional details for your customer. Optional.</td></tr><tr><td>7</td><td><strong>Min Digits</strong></td><td>Specifies the minimum number of digits required for the input. Optional.</td></tr><tr><td>8</td><td><strong>Max Digits</strong></td><td>Specifies the maximum number of digits allowed for the input. Optional.</td></tr><tr><td>9</td><td><strong>Required Setting</strong></td><td>Defines whether the input is required or not.</td></tr></tbody></table>

![New Custom Field form with single-line text settings for the Basket scope](https://621103948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsqWfi8ifBhTdkvf1vOlY%2Fuploads%2Fwhj1xQIkPJmuabj9EMkL%2Fcustom-fields-single-line-text_1ko231j.png?alt=media)
{% endstep %}
{% endstepper %}

***

## Option Set settings

For single-line text custom fields created for an Option Set, two additional settings are available:

<table><thead><tr><th width="60">#</th><th>Setting</th><th>Description</th></tr></thead><tbody><tr><td>10</td><td><strong>Custom field must be unique</strong></td><td>Controls whether the data entered must be unique for each entry, preventing duplicate values.</td></tr><tr><td>11</td><td><strong>Exposed to Embed</strong></td><td>Enabled by default to allow the custom field to be used in embeds.</td></tr></tbody></table>

![New Custom Field form with single-line text settings for the Option Set scope](https://621103948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsqWfi8ifBhTdkvf1vOlY%2Fuploads%2F2iUSJUAt1azIahGmWnZ6%2Fcustom-fields-single-line-text_13ocmu3.png?alt=media)

***

## How it appears in the Basket

Once you've created a single-line text custom field and added it to the Basket form, it appears as a simple input field. The field can be set as required or optional, and it can also include validation based on a Regex Regular Expression.

![Single-line text input on the Basket form](https://621103948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsqWfi8ifBhTdkvf1vOlY%2Fuploads%2F5B833z1izePjPlFWJMIK%2Fcustom-fields-single-line-text_sdjdjw.png?alt=media)

***

## Related articles

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Custom Fields Overview</strong></td><td>Learn field types, scopes, and how to manage custom fields.</td><td><a href="/platform/custom-fields/custom-fields.md">Custom Fields Overview</a></td></tr><tr><td><strong>Multi-Line Text Field</strong></td><td>Collect longer notes and instructions on the Basket form.</td><td><a href="/platform/custom-fields/multi-line-text-field.md">Multi-Line Text Field</a></td></tr><tr><td><strong>Translatable Text Field</strong></td><td>Store Option Set text with translations for each language.</td><td><a href="/platform/custom-fields/translatable-text-field.md">Translatable Text Field</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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 following URL with the `ask` and `goal` query parameters:

```
GET https://help.mimeeq.com/platform/custom-fields/single-line-text-field.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

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.
