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

# Parse from Form URL encoded

> Converts a Form URL encoded string into a data object.

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 Form URL encoded string into a data object. This is the format a web form or query string uses, where values are joined with `&` and written as `key=value`, such as `sku=A1&name=Wool+scarf`. Use this when a value arrives in that shape, for example the body of a form submission or a captured query string, and you want to turn it back into structured data you can read field by field.

This documentation describes: [Schema](/schemas/mapper/deserialize-form-urlencoded)

## Fields

<FormField property="compatibilityMode" label="Compatibility">
  Chooses how keys with special characters are interpreted. The default, **PHP compatible**, follows the same rules as a web server: a dot inside a key becomes an underscore (`product.name` becomes `product_name`), and bracketed keys such as `tags[]=red&tags[]=warm` are gathered into a list. **Javascript compatible** keeps keys exactly as written, so `product.name` stays `product.name` and each `tags[0]`, `tags[1]` stays a separate key.
</FormField>

## Sample data

| Field         | Value                    |
| ------------- | ------------------------ |
| Compatibility | PHP compatible (default) |

Input:

```json theme={null}
{
    "payload": "sku=A1&name=Wool+scarf&tags[]=red&tags[]=warm"
}
```

Output:

```json theme={null}
{
    "payload": {
        "sku": "A1",
        "name": "Wool scarf",
        "tags": [
            "red",
            "warm"
        ]
    }
}
```

```json Configuration theme={null}
{
  "prototype": "deserialize-form-urlencoded",
  "parameters": {
    "compatibilityMode": "MODE_PHP"
  }
}
```
