---
title: "Make an optional checkout field required for purchase"
description: "Have important information you don't want customers to be able to skip? Here is how"
url: https://help.cartgenie.com/en/articles/200-make-an-optional-checkout-field-required-for-purchase
collection: "Store Pages FAQ"
updated: 2026-06-16
language: en
---

# Make an optional checkout field required for purchase

Have important information you don't want customers to be able to skip? Here is how

This can be very useful if you’re collecting custom information at checkout or want to make any other optional field (such as phone number) required at checkout.

[

Collect custom information at checkout

Easily collect personalized information at checkout such as notes, gift messages, tax IDs, etc.

](https://help.cartgenie.com/en/articles/96-collect-custom-information-at-checkout.md)

## How to Make Any Optional Checkout Field Required

In Webflow, select your checkout field (such as input, textarea, radio, checkbox, etc.) and **add a new custom attribute** to it.

Go to the Layer **Settings** tab in Webflow and click the **\+ icon** in the Custom Attributes section.

![](https://staticfiles.gleap.io/gattachments/0eqd55aGf4ALlz6iXeuQwb8YCajCdRVsD0IR6xFlCdeu8KVjTapvdiP5zxSedSsbAqthYTJ2An2.png)

Enter these values for the attribute:

**Name:**

```javascript
data-cg-field-required
```

**Value:**

```javascript
1
```

When done, the custom attribute should look like this:

![](https://staticfiles.gleap.io/gattachments/VWi1BzWesFbw6SevbEtkjqixJ4qSl1TGe9H7JWKwBaCLWxZzv66088tkcAe4ccfC0moBqQ89PWc.png)

Be sure to **publish** your site again to make the changes live.

## Error Messages for Required Fields

If a customer doesn’t fill out this field before pressing the Complete Purchase button, then CartGenie will show an error message letting them know it is required.

![](https://staticfiles.gleap.io/gattachments/LhovDmuW8uDsWQGWRYzJVHJs7Rtf1F7lOo9hEeXVfUoXfmcILRp3nfkj9nf95eLLqyKPdkdYIjO.png)

CartGenie uses the following cascading labels for the field name displayed to the customer so be sure they are clear and make sense to the customer.

1.  **data-cg-meta:** This is the field name from a [custom info](https://help.cartgenie.com/en/articles/96-collect-custom-information-at-checkout.md) field
    
2.  **name:** found in the layer settings panel
    

![](https://staticfiles.gleap.io/gattachments/24Hk7xnsElkbkYBmHE3lw0dR0Av3vH0WZaBWTlnUIricuFPqvHHDooXncZ2E7p9l7PKjzB21hMG.png)
