=== Embed for Tally ===
Contributors: hendcorp
Tags: tally, tally forms, embed, popup form, survey
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Embed Tally forms in WordPress with a block or shortcode: inline, popup or slide-in, with a live preview of the form in the editor.

== Description ==

Add Tally forms to WordPress without editing HTML. Tally (tally.so) suggests pasting its embed code into a Custom HTML block. That works, but you get no preview in the editor, every option means editing HTML by hand, and page builders need a different approach again.

Embed for Tally gives you a **Tally Form block** that shows the real form in the editor, with every embed option in the block sidebar, and a `[tally_form]` shortcode for the classic editor, widgets, Elementor, Divi, Bricks and other page builders. Show a Tally form inline, as a popup, or as a slide-in, without touching HTML.

= How to embed a Tally form in WordPress =

1. In Tally, open your form, go to **Share** and copy the share link (it looks like `https://tally.so/r/mRoDv3`).
2. In the WordPress editor, add the **Tally Form** block. Type "tally" in the block search to find it.
3. Paste the link and click **Embed**. The live form appears in the editor.
4. In the block sidebar, choose inline, popup or slide-in, adjust the options, and publish.

Using the classic editor or a page builder? Paste the shortcode instead: `[tally_form id="mRoDv3"]`.

**Features**

* Paste a form URL or ID. Share links, embed URLs and bare IDs all work.
* Three display modes: inline, popup (centred with overlay) and slide-in (bottom corner).
* Display options: hide title, transparent background, auto height, fixed height, left alignment.
* Popup and slide-in options: button text, button style, popup width, emoji, auto close, and open after a delay.
* Pass static hidden-field values from the block or shortcode.
* Any number of forms on one page, each with its own settings.
* Tally's embed script loads only on pages where a form is rendered.
* A settings page with defaults for new forms, under its own Tally Forms menu.

**Shortcode**

`[tally_form id="mRoDv3" mode="inline" hide_title="1" transparent="1" auto_height="1"]`

See the FAQ for the full list of attributes.

**Why this plugin exists.** I built it for a friend who runs their forms on Tally and wanted them in WordPress without pasting HTML. It worked well, so I'm sharing it here for anyone in the same spot.

== External services ==

This plugin embeds forms from Tally (tally.so), a third-party form builder. It does not work without it.

On every page where a form is rendered, the plugin loads Tally's embed script from `https://tally.so/widgets/embed.js` and embeds the form from `https://tally.so/embed/{form-id}` (inline) or `https://tally.so/popup/{form-id}` (popup and slide-in). Tally's script also sends the current page path and query string to Tally so they can be stored in hidden fields. Anything a visitor types into the form is sent to Tally, not to your WordPress site.

In the WordPress admin, the plugin contacts Tally only if you click **Request this feature** on the Tally Forms → Submissions page. That opens a short feedback form hosted on Tally (`https://tally.so/r/1A85lO`) and loads Tally's embed script at that moment. The form sends what you type, plus the plugin's version number. The plugin does not require a Tally API key.

Tally's terms and privacy policy: [https://tally.so/help/terms-and-privacy](https://tally.so/help/terms-and-privacy)
Tally's GDPR information: [https://tally.so/help/gdpr](https://tally.so/help/gdpr)

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` or install it from the Plugins screen.
2. Activate the plugin.
3. Add the **Tally Form** block to a post or page and paste your form's share link, or use the `[tally_form id="..."]` shortcode.
4. Optionally set defaults under **Tally Forms → Settings**.

== Frequently Asked Questions ==

= Is this an official Tally plugin? =

No. Embed for Tally is an independent plugin by Hendra Setiawan and is not affiliated with or endorsed by Tally. "Tally" is a trademark of its owner.

= Do I need a Tally account? =

Yes. Forms are built at tally.so; a free Tally account is enough.

= How do I add a Tally popup form to WordPress? =

Add the Tally Form block, paste your form link, and set **Display mode** to **Popup** in the block sidebar. Your page shows a button that opens the form in a centred popup. You can change the button text and style, open the popup automatically after a few seconds, and close it after the form is submitted. With the shortcode, use `[tally_form id="mRoDv3" mode="popup" button_text="Contact us"]`.

= Can I show a Tally form as a slide-in? =

Yes. Set **Display mode** to **Slide-in**, or use `mode="slidein"` in the shortcode. The form opens in a small panel in the bottom corner of the page.

= Where do I find the form ID? =

In your form's share link (`https://tally.so/r/mRoDv3`), embed URL (`https://tally.so/embed/mRoDv3`) or editor URL (`https://tally.so/forms/mRoDv3/edit`). You can paste any of those, or just the ID.

= How do I embed a Tally form in Elementor, Divi or Bricks? =

Use the shortcode. Put `[tally_form id="..."]` in the builder's shortcode, text or HTML element. The same shortcode works in the classic editor and in widgets.

= Can I pass hidden fields to my Tally form? =

Yes. Add static values in the block's **Hidden fields** panel (one `key=value` per line) or with `hidden="source=website,campaign=spring"` in the shortcode. The keys must match hidden fields in your Tally form. Tally also receives the page's address and query parameters automatically.

= What shortcode attributes are there? =

`id` (required), `mode` (`inline`, `popup`, `slidein`), `hide_title`, `transparent`, `auto_height`, `height` (px), `align` (`left` or `center`), `button_text`, `button_style` (`inherit` or `basic`), `open_delay` (seconds), `width` (popup width in px), `overlay` (slide-in only), `emoji`, `emoji_animation`, `auto_close` (seconds), `hidden` (`key=value,key2=value2`), `title` (accessible name of the form).

= Where do I find submissions? =

In your Tally account. The plugin displays your forms; everything visitors send is stored by Tally. Open the form in Tally and go to its Submissions tab.

= Can submissions be stored in WordPress too? =

Not yet. If you would use that, click **Request this feature** under Tally Forms → Submissions, or say so in the support forum. Those requests decide what gets built next.

= Will this slow my site down? =

No. Tally's embed script is only loaded on pages where a form is actually rendered, and the form iframe is lazy-loaded.

= Where is the source code for the block? =

The block editor script in `build/` is compiled from the files in `src/`, which are included in the plugin. To rebuild it, run `npm install` and then `npm run build` in the plugin folder. The build uses @wordpress/scripts, as listed in `package.json`.

== Screenshots ==

1. The Tally Form block shows the live form in the editor, with its options in the block sidebar.
2. Popup and slide-in options: button text and style, popup width, auto-open delay, close after submit and emoji.
3. A popup form on the front end, opened from a button on the page.
4. Tally Forms → Settings: site-wide defaults for every form.

== Changelog ==

= 1.0.1 =
* Fix: popup and slide-in buttons now line up with other buttons placed next to them.
* Improvement: the "Theme" button style now uses your theme's button design, including its shape and hover state.
* Fix: the "Basic" button style now looks the same in every theme. Some themes, such as Twenty Twenty-One, restyled it.
* Fix: the "Basic" button's keyboard focus outline is now visible on light backgrounds.

= 1.0.0 =
* Initial release: Tally Form block, `[tally_form]` shortcode, inline, popup and slide-in modes, settings page.
