> For the complete documentation index, see [llms.txt](https://helpdesk.ldtsoft.work/ldt-online-course/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://helpdesk.ldtsoft.work/ldt-online-course/build-your-course/how-to-add-custom-data-to-your-courses.md).

# How to add custom data to your courses

Define extra fields for your courses — a level, a code, an internal note — and fill them in per course

Create a definition once, then fill the value in on each course the same way you type a title.

Definitions live in **Settings → Custom data**; the values live on the course itself, in the **Custom data** card that appears at the bottom of the course form.

### 1. Open the custom data definitions

In Shopify admin, open **Apps** -> **LDT Online Courses** -> **Settings** (1a), then click **Custom data** (1b) in the app's Settings menu. The list holds every definition you have made, with its **Title**, **Key**, **Type** and creation date.

<figure><img src="https://3532245007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRJ3j93eHyen8t2flj5y%2Fuploads%2Fgit-blob-cc89827048827db2f0621b8bb36e917ddb95e325%2Fhow-to-add-custom-data-to-your-courses-step-1.png?alt=media" alt="Opening Settings in Shopify admin and then Custom data in the app menu"><figcaption></figcaption></figure>

### 2. Fill in the title, key and description

Click **Add definition** at the top right of the list, then fill in the form:

* **Title** — what the field is called wherever it shows up, for example `Level`.
* **Key** — the machine name. It is generated from the title as you type (`Level` becomes `level`), and it can only hold letters, numbers, underscores and dashes.
* **Description** — optional, up to 100 characters.

<figure><img src="https://3532245007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRJ3j93eHyen8t2flj5y%2Fuploads%2Fgit-blob-de8be722d0b7d906609107fe64ed21b7374617a8%2Fhow-to-add-custom-data-to-your-courses-step-2.png?alt=media" alt="Filling in the title and the generated key of a new definition"><figcaption></figcaption></figure>

### 3. Choose the type

Pick the **Type** that matches the answer you expect:

| Type                 | Use it for                                         |
| -------------------- | -------------------------------------------------- |
| **Single line text** | a short value: a level, a code, an instructor name |
| **Multi-line text**  | a longer note or a summary                         |
| **Number**           | a duration, a position in a series                 |
| **Date and time**    | a start date, a deadline, an internal review date  |

<figure><img src="https://3532245007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRJ3j93eHyen8t2flj5y%2Fuploads%2Fgit-blob-1cf63174a493b18d604ffd4e6e28ce8abf4fd5c6%2Fhow-to-add-custom-data-to-your-courses-step-3.png?alt=media" alt="Choosing Single line text as the type of the new definition"><figcaption></figcaption></figure>

### 4. Save the definition

The top bar shows **Unsaved changes** with **Discard** and **Save** — click **Save**. The app confirms with **Definition created** and opens the definition.

<figure><img src="https://3532245007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRJ3j93eHyen8t2flj5y%2Fuploads%2Fgit-blob-ab1945c485593b738b754c1f81f4e302a7f59592%2Fhow-to-add-custom-data-to-your-courses-step-4.png?alt=media" alt="Saving the new definition from the Unsaved changes bar"><figcaption></figcaption></figure>

### Result

The definition is now part of every course. Open a course and scroll to the **Custom data** card: it holds one field per definition, with **View definitions** in the card header. Whatever you type there is saved with the course.

### Troubleshooting

* **The definition is missing on a course.** Reload the course form — the fields are read when the form opens, so a definition created in another tab appears after a reload.
* **The key is rejected.** A key takes letters, numbers, underscores and dashes only; a space or an accent is refused. Change the title and the key is generated again.
* **The type is wrong.** **Type** and **Key** are locked once the definition is saved, so delete the definition and create it again with the right type.
* **Deleting a definition.** Open the definition and click **Delete**; the confirmation warns that **all data in this field** is deleted with it, on every course.

### Related pages

* [How to Duplicate a Course](https://helpdesk.ldtsoft.work/ldt-online-course/build-your-course/how-to-duplicate-a-course.md)
* [Setting Up New Courses: The Quick Copy-Paste Method](https://helpdesk.ldtsoft.work/ldt-online-course/translations/setting-up-new-courses-the-quick-copy-paste-method.md)
* [How to use the APIs](https://helpdesk.ldtsoft.work/ldt-online-course/build-your-course/how-to-use-the-apis.md)
