# Link form to product purchase

Attach a form to the purchase flow when the form must be tied to a product order.

Use this when the form is part of the buying journey.

Examples include personalisation, custom order details, and pre-purchase questions.

> **Warning:** This feature requires theme-level code edits.

### When to use this setting

Enable this only when the form must be connected to a product purchase flow.

If the form is just a page form or lead form, keep this off.

> **Screenshot placeholder:** Form settings with **Link form to product purchase** enabled inside **Advance Settings**.

### Enable purchase linking

1. **Open the form settings**
   From **Forms**, open **Settings** for the form.

2. **Open Advance Settings**
   Expand the advanced options for the form.

3. **Enable purchase linking**
   Check **Link form to product purchase**.

4. **Apply the theme code changes**
   Add the required theme implementation before going live.

5. **Test the full purchase flow**
   Confirm the form appears in the right place and the data is tied to the correct purchase.

### Common use cases

- engraving or personalisation details
- compliance or eligibility questions
- trade or project reference capture
- order-specific notes that should stay with the purchase flow

### Recommended approach

Have your developer or support team implement the theme changes before launch.

Then test with a real product flow, not only in the editor.

### Troubleshooting

#### The form is enabled but nothing happens on the storefront

Check these first:

- the setting is enabled
- the form changes were saved
- the required theme code changes were applied

#### The form shows in the wrong place

Review the theme implementation and test the exact product template involved.

### Related guides

- [Building with forms](https://www.roadmap.so/docs/forms/building-with-forms)
- [Add a form to your theme](https://www.roadmap.so/docs/forms/add-a-form-to-your-theme)
