# Lead Intake Forms

The campaign's **Lead Intake Forms** page, under the **Forms** tab, lets you create Lead Intake Forms and put them on your own website. When a visitor fills one in, Aktify receives the lead directly and adds it to the campaign. Each form belongs to one campaign and can't be moved to another.

The Lead Intake Forms page is available to **Customer Admins**.

## Creating or editing a Lead Intake Form

Select **Create form**, or the edit icon on an existing form. A form has these settings:

- **Name** and **Description**: for your reference only. Visitors never see them.
- **Campaign type**: SMS or RCS.
- **Active**: whether the form appears on your site. A new form starts active. Turning a form off removes it from your site without deleting it.

**Display**

- **Headline**: optional text above the form.
- **Invitation message**: optional text shown beside the floating button to invite visitors to open the form.
- **Button text**: the submit button's label. If left blank, it says **Submit**.
- **Primary color**: the panel header and buttons.
- **Secondary color**: the floating button. Its icon is white, so avoid white or very light colors. If left blank, the primary color is used.
- **Location field**: whether visitors enter a **Zip code** or a **State**. Every submission needs a location, because messaging regulations depend on the lead's state. A zip code is converted to its state.

**Consent disclosure**

- **Company name override**: the company name shown in the consent text. If left blank, your company's name is filled in when you save. Changing your company's name later doesn't update existing forms, so edit the form if the name it shows needs to change.
- **Privacy Policy URL** and **Terms & Conditions URL**: required. They're linked from the consent text.
- The consent wording itself is managed by Aktify. To change it, contact your **Aktify Account Executive**.

**Security**

- **Allowed origins**: see [Restricting which websites can use a Lead Intake Form](#restricting-which-websites-can-use-a-lead-intake-form).

Use the preview icon to see the form as visitors will.

## Embedding a Lead Intake Form on your website

Select the embed-code icon on a form and choose one of two styles. Copy the snippet and paste it into your site.

### Floating widget

A floating button in the corner of the page that opens the form in a panel. Aktify styles it, and it runs in an iframe, so your page's CSS can't affect it. Paste the snippet into the page's `<head>` or just before `</body>`:

```html
<link rel="stylesheet" href="https://lead-widget.aktify.io/loader.css" />
<meta name="aktify-lead-intake-config-formId" content="YOUR-FORM-ID" />
<script defer async src="https://lead-widget.aktify.io/loader.min.js"></script>
```

If your site sends a Content-Security-Policy header, allow `script-src`, `style-src` and `frame-src` for `https://lead-widget.aktify.io`.

### Inline form

The form appears directly in your page, wherever you place the `<div>`, with **no styling of its own**, so your site's CSS controls how it looks. The script can go anywhere on the page:

```html
<div data-aktify-lead-form data-form-id="YOUR-FORM-ID"></div>
<script defer src="https://lead-widget.aktify.io/lead-form-inline.js"></script>
```

You can place several inline forms on one page, and each works independently.

If your site sends a Content-Security-Policy header, allow `script-src` and `connect-src` for `https://lead-widget.aktify.io`. Without them, the form won't load or submit.

Don't add an `integrity` attribute to the script tag. The script is updated in place whenever Aktify releases improvements, so a pinned hash would break the form after the next update. Use Content-Security-Policy to restrict where scripts come from instead.

### Styling the inline form

The inline form uses these class names, so your CSS can target them:

| Class | Element |
| --- | --- |
| `.aktify-lead-form` | The form |
| `.aktify-lead-form__headline` | The optional headline |
| `.aktify-lead-form__field` | The wrapper around each field |
| `.aktify-lead-form__label` | A field's label |
| `.aktify-lead-form__input` | The name, phone and zip code inputs |
| `.aktify-lead-form__select` | The state dropdown |
| `.aktify-lead-form__error` | A field's validation message |
| `.aktify-lead-form__consent` | The consent checkbox and its text |
| `.aktify-lead-form__checkbox` | The consent checkbox |
| `.aktify-lead-form__disclosure` | The consent text |
| `.aktify-lead-form__submit` | The submit button |
| `.aktify-lead-form__submit-error` | A message when a submission fails |
| `.aktify-lead-form__success` | What's shown after a successful submission |
| `.aktify-lead-form__duplicate` | What's shown when we already have the visitor's details |
| `.aktify-lead-form__reload` | What's shown when the visitor needs to reload the form |
| `.aktify-lead-form__reload-button` | The button that reloads the form |

## Restricting which websites can use a Lead Intake Form

By default, a form works on any website. To limit it to your own sites, enter them under **Allowed origins**, one per line, for example:

```
https://www.example.com
https://example.com
```

An origin is the scheme and domain, plus the port if your site uses a non-standard one. Don't include a path. Each variant of your domain, like `www.` and the bare domain, needs its own line.

When the list isn't empty, the form only loads and accepts submissions on those websites, for both the floating widget and the inline form. On any other site it doesn't appear. The preview in the Aktify Portal always works.

This stops other websites from copying your embed code. It doesn't block someone sending data directly to the form's web address outside a browser.

## What visitors see

- Visitors enter their **name**, **mobile phone** (US numbers) and their **zip code** or **state**, depending on the form's location field.
- The **consent checkbox isn't required**. If a visitor leaves it unchecked, the form still submits and their choice is recorded, but they **won't be contacted** by the campaign.
- After submitting, visitors see **"Thanks! We've received your info."** Visitors who checked the consent box also see **"We'll be in touch shortly."**
- If we already have the visitor's details for this campaign, the form says so instead.
- If the form changed while the visitor had it open, or they try to submit the same form twice, they're asked to reload the form and try again.

## If a Lead Intake Form can't be activated

If a form shows as **Unavailable**, or you see a message that it can't be activated because of a technical problem, the form can't take submissions right now and is turned off. Contact your **Aktify Account Executive**. Once the problem is fixed, activate the form again yourself. It won't turn back on by itself.

## Removing a Lead Intake Form

To remove a form, turn it off with **Deactivate**. To have a form deleted entirely, contact your **Aktify Account Executive**.
