# ELMO Forms

# Installation and configuration

The plugin embeds ELMO signup forms on WordPress/WooCommerce sites.
Version 1.0.0, files: `cszd-forms.php`, `cszd-mail.php`, `cszd-support.php`.

## Installation

1. Upload the plugin directory to `wp-content/plugins/`.
2. Activate it under *Plugins → Installed Plugins*.
3. Go to *Settings → ELMO Forms*.

## Configuration

| Field | Description |
|---|---|
| **Base URL** | Address of your ELMO instance, e.g. `https://elmo.piotrlitwa.com`. Stored without a trailing slash. |
| **API Key** | Key from the ELMO panel, format `cszd_xxxxxxxx…`. |

Without both values the forms will not render.

# Shortcode [elmo_form]

Basic usage — `uuid` is the only required attribute:

```
[elmo_form uuid="your-uuid"]
```

Without `uuid` the plugin renders a red error message instead of the form.

## Attributes

| Attribute | Default | Description |
|---|---|---|
| `uuid` | — | **Required.** Form identifier in ELMO. |
| `height` | `400` | Height in pixels. |
| `width` | `100%` | Width — pixels or percentage. |
| `mode` | `iframe` | `iframe` or `native`. |
| `title` | empty | Overrides the title coming from ELMO. |
| `subtitle` | empty | Overrides the subtitle coming from ELMO. |

## Example

```
[elmo_form uuid="a1b2c3" mode="native" height="520" title="Sign up"]
```

Besides the shortcode, the plugin provides a widget and a Gutenberg block.

# Thank-you page

A separate form appended to the WooCommerce thank-you page — typically a newsletter signup
in exchange for a coupon. Configured under *Settings → ELMO Forms*.

| Option | Default |
|---|---|
| `elmo_forms_thankyou_uuid` | empty — **without it the section will not appear** |
| `elmo_forms_thankyou_title` | "Dolacz do newslettera!" |
| `elmo_forms_thankyou_subtitle` | "Odbierz kupon rabatowy na nastepne zakupy." |

Title and subtitle override whatever comes from ELMO.