> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alumio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cast: String

> Converts a value into a string ("abc", "example").

export const FormField = ({property, label, required = false, diType, uiPatterns, children}) => {
  const patterns = Array.isArray(uiPatterns) ? uiPatterns : uiPatterns ? [uiPatterns] : [];
  return <div style={{
    margin: '1.5rem 0'
  }}>
      <div style={{
    display: 'flex',
    alignItems: 'baseline',
    flexWrap: 'wrap',
    gap: '0.5rem',
    marginBottom: '0.25rem'
  }}>
        <strong>{label}</strong>
        <span style={{
    fontSize: '0.7rem',
    fontWeight: 600,
    textTransform: 'uppercase',
    letterSpacing: '0.04em',
    color: required ? '#6241f5' : '#6b7280'
  }}>
          {required ? 'Required' : 'Optional'}
        </span>
      </div>

      <div>{children}</div>

      {diType || patterns.length > 0 ? <p style={{
    fontSize: '0.85rem',
    color: '#6b7280',
    marginBottom: 0
  }}>
          {diType ? <>
              See the <a href={`/references/${diType}`}>{diType}</a> reference.{' '}
            </> : null}
          {patterns.length > 0 ? <>
              Accepts a <a href={`/documentation/placeholders-and-patterns/patterns#${patterns[0]}`}>pattern</a>.
            </> : null}
        </p> : null}
    </div>;
};

Converts a value into a string ("abc", "example"). Use this when a value should be plain text but arrives as a number or a true/false flag, for example a product code such as `100245` that needs to keep its exact written form rather than be treated as a number. A number like `100245` becomes the text `"100245"`, and a true/false flag becomes `"1"` for true or an empty text for false.

This documentation describes: [Schema](/schemas/mapper/cast-string)

## Fields

This mapper has no settings to configure. Point it at the value you want to convert and it does the rest.

## Sample data

| Field         | Value |
| ------------- | ----- |
| (no settings) |       |

Input:

```json theme={null}
{
    "sku": 100245
}
```

Output:

```json theme={null}
{
    "sku": "100245"
}
```

The value is converted to text. When that text happens to look like a number (as with `100245`), some preview screens may still show it without quotation marks, but it is stored and sent on as text.

```json Configuration theme={null}
{
  "prototype": "cast-string",
  "parameters": {}
}
```
