=== Bina – AI Form Builder for Contact Form 7 with Drag & Drop, Entries & Styling ===
Contributors: webeantech
Tags: contact form 7, ai form builder, ai forms, drag and drop, cf7
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.1.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI and drag-and-drop form builder for Contact Form 7. Draft forms with AI, import existing forms, save entries to your database, style without CSS.

== Description ==

Bina turns Contact Form 7 into a visual form builder.

Import an existing CF7 form with one click, edit it by dragging fields around, and push it back live when you are happy. You never touch shortcode syntax or markup.

Nothing on your site changes until you decide it should. An imported form arrives as a draft, you preview it on the front end before it goes anywhere, and every push can be rolled back for 24 hours. That safety net exists for one reason: pushing a form live regenerates its Contact Form 7 markup. Your fields, names, options and mail settings are kept, but any custom HTML around them is rebuilt in Bina's layout.

Contact Form 7 does not save submissions on its own. Bina saves every entry to your own WordPress database, where you can search them, mark them read, and export the lot to CSV.

You can also style Contact Form 7 without CSS. Pick colors, spacing and fonts for one form at a time and watch the preview change as you go.

Your forms stay Contact Form 7 forms. Bina writes ordinary CF7 markup, so your mail settings, your integrations and your CF7 add-ons carry on working exactly as before.

= Generate a Contact Form 7 form with AI =

If you would rather describe a form than draw it, Bina can draft a Contact Form 7 form from a plain-English description. Write "an appointment request form with date, time and phone number" and read what comes back before anything is created. That part runs on your own API key from OpenAI, Anthropic or Google Gemini, and stays switched off until you add one.

= Why a visual editor instead of hand-written CF7 tags =

CF7 still handles submission, validation and mail, so there is nothing to migrate and nothing to be locked into. Deactivate Bina whenever you like and your forms keep working as normal Contact Form 7 forms.

Imports of an existing Contact Form 7 form arrive in Bina as a draft. Your live form changes only when you push it, you get a preview first, and any push can be rolled back with one click for the next 24 hours.

Bina stores every Contact Form 7 submission in your own WordPress database rather than only emailing it out.

Bina sends nothing off your site unless you switch it on: anonymous usage statistics, or the AI generator with your own provider key. Your form entries and your visitors' personal data stay on your server in every case.

The front end weighs under 15KB, and its styling applies only to the forms Bina manages.

= What Bina adds to Contact Form 7 =

* **Build a form with AI:** write "an appointment request form with date, time and phone number", read what comes back, ask for changes, then create the form. It uses your own API key for OpenAI, Anthropic or Google Gemini, and does nothing at all until you add one.
* **Build your form visually:** drag fields into place and resize responsive multi-column rows. This is the two-column Contact Form 7 layout that normally needs hand-written CSS.
* **Style your forms without CSS:** colors, spacing, fonts, borders and field height are all controls in Bina's Appearance panel, with Normal, Hover and Focus states and a live preview. It styles one Contact Form 7 form at a time, and the markup stays standard CF7.
* **Keep every submission:** Bina saves each Contact Form 7 entry to your own WordPress database, with read and unread states, search, and CSV export in one click.
* **Import your forms in one click:** any existing Contact Form 7 form comes into Bina as it is. Nothing on your site changes until you push.
* **Nothing goes live until you push:** your edits sit in a draft. Bina warns you if somebody has edited the form in the CF7 admin meanwhile, and every push can be rolled back for 24 hours.
* **Supports all Contact Form 7 fields:** all 14 types. Text, email, textarea, dropdown, checkboxes, radio, file upload, date, number, URL, tel, hidden, acceptance and quiz. Tags from CF7 add-ons are preserved and keep working.
* **Your field settings stay intact:** every Contact Form 7 field option survives the trip, including min and max, placeholder, autocomplete, readonly, akismet, custom classes and ids.
* **Edit at speed:** a hover toolbar for move, duplicate and delete, plus keyboard shortcuts and undo/redo.
* **Autosave while you work:** your progress survives a crash or an accidentally closed tab.
* **Preview on your own theme:** see the form rendered on the front end, styled the way your visitors will see it.
* **Your other forms stay untouched:** the styling is lightweight and low-specificity, and applies only to Bina-managed forms. Your other CF7 forms are never restyled, and one filter turns it off entirely.
* **Read the code Bina wrote:** a code view shows the generated CF7 markup whenever you want to check it.

= Who this Contact Form 7 builder is for =

Agencies and freelancers looking after Contact Form 7 on a lot of client sites, who would rather not hand-edit shortcodes any more.

Site owners who trust CF7 but want a proper editor and somewhere to read what people sent.

Anyone who has lost an enquiry because the form only ever sent an email.

== Installation ==

Bina requires WordPress 6.2 or later, PHP 7.4 or later, and the free Contact Form 7 plugin installed and active.

1. Install Contact Form 7 and activate it. Bina builds on top of it.
2. Install Bina from Plugins > Add New, or upload the plugin ZIP. Activate it.
3. Open the new Bina menu, pick any Contact Form 7 form, and click Migrate to Bina. Or start a new form from scratch.
4. Edit it, preview it, then press Push to Live. Your live form does not change until you push, and you can roll any push back within 24 hours.

== Frequently Asked Questions ==

= How do I edit Contact Form 7 forms without shortcodes? =

Install Bina alongside Contact Form 7, open the Bina menu, and import any form you already have with one click. From there you drag fields into place instead of typing tags like `[text* your-name]`. The shortcode is still written, correctly, every time you push the form live. You just never have to write it yourself.

= How do I save Contact Form 7 entries to a database? =

Contact Form 7 emails a submission and then forgets it. Bina writes every submission to a table in your own WordPress database as well, so an enquiry that never arrives by email is still there. Entries have read and unread states, search across everything a visitor typed, and one-click CSV export. Nothing is sent to Bina's developers or to anyone else.

= How do I style Contact Form 7 without CSS? =

Open a form in Bina and use the Appearance panel. Colors, spacing, fonts, borders, corner radius and field height are all controls, with Normal, Hover and Focus states for fields, Normal and Hover for the submit button, and a live preview beside them. The styling is scoped to that one form, so your other forms are untouched, and the markup stays standard Contact Form 7.

= How do I create a two-column Contact Form 7 layout without CSS? =

Drag a row onto the canvas, drop fields into it, and pull the divider to set the widths. Contact Form 7 has no layout syntax of its own, so this is normally hand-written CSS. Bina writes the markup and the styles for you, and the form is still a plain Contact Form 7 form.

= Will importing my Contact Form 7 form break the live form? =

Importing does not touch your live form. It creates a draft. The live form changes when you press Push to Live, and that is when Bina regenerates the markup: fields and options are kept, custom HTML wrappers are rebuilt into Bina's layout. Preview first, and use the 24-hour rollback if anything looks wrong.

= Does Bina replace Contact Form 7? =

No. Bina is a builder that sits on top of it. CF7 keeps handling submission, validation and mail. Deactivate Bina and your forms carry on as normal CF7 forms.

= Is Bina free? =

Yes. The version on WordPress.org is completely free and includes the whole visual builder, one-click Contact Form 7 import, entry storage with CSV export, the front-end preview and the styling.

= Can I generate a Contact Form 7 form with AI? =

Yes, if you bring your own API key. Describe the form in plain English and Bina asks your provider to draft it. It asks a question or two when the request is genuinely ambiguous, shows you the fields it proposes before anything is created, and lets you ask for changes. Every generation reports what it cost in tokens. OpenAI, Anthropic and Google Gemini all work, and the feature does nothing at all until an administrator saves a key.

= Is this compatible with my theme and with popular page builders like Elementor and Divi? =

Yes. Bina forms stay ordinary Contact Form 7 forms, so you place them on a page exactly as you always have: the shortcode, the Contact Form 7 block, or a form widget in a builder like Elementor or Divi. To be clear about which tool does what, you build and edit the form in Bina, and the page builder only places it on the page. Bina's optional styling is light and only touches the forms it manages.

= Does Bina work with my Contact Form 7 add-ons? =

Yes. Tags from CF7 add-ons are imported, kept intact, and written back exactly as they were on push. You can still edit their name, label, required flag and raw options in the builder.

= Will Bina restyle my other Contact Form 7 forms? =

No. Bina's front-end styling only applies to forms Bina manages. Your other CF7 forms keep the look they have. You can also switch the styles off completely with the `bina_load_form_styles` filter.

= What happens to my Contact Form 7 mail settings? =

They are kept. Bina round-trips CF7's mail, mail (2) and messages settings on import and on push. You still edit them in the CF7 admin tabs you already know.

= What data does Bina send externally? =

By default, nothing. Two optional features can send something, and only once you have switched them on:

1. Anonymous, non-personal usage data (WordPress, PHP and Contact Form 7 versions, the plugin version, and which features get used), if you opt in. You can opt out again at any time.
2. The AI form generator, if an administrator saves an API key for an AI provider. Only the description you type is sent, from your own server to that provider.

Your form entries and your visitors' data are never sent anywhere by either feature.

= How does Bina's AI form generator for Contact Form 7 work? =

It does nothing until an administrator opens Bina, picks a provider (OpenAI, Anthropic or Google Gemini), and saves an API key from their own account. Nothing is sent before that, and deleting the key switches the feature off again.

When you generate a form, your server sends the description you typed straight to the provider you chose, using your key. If you ask for changes, the working form structure goes along so the model can edit it. That is the whole of what is sent: no entries, no visitor data, no site content, and nothing passing through Bina's developers. Your usage is billed by the provider you picked and governed by their terms. See the terms and privacy policies for OpenAI (https://openai.com/policies/terms-of-use/ and https://openai.com/policies/privacy-policy/), Anthropic (https://www.anthropic.com/legal/commercial-terms and https://www.anthropic.com/legal/privacy) and Google (https://ai.google.dev/gemini-api/terms and https://policies.google.com/privacy).

Your API key is stored encrypted in your own database and is never shown again once saved, beyond the last four characters so you can tell which key it is. If you would rather the feature did not exist at all, define `BINA_DISABLE_AI` in wp-config.php and it is gone.

= Which third-party service powers Bina's optional analytics? =

Freemius, Inc. The opt-in usage analytics and the deactivation feedback form both go through them. Data is sent only if you opt in, and only the anonymous, non-personal information described above. It never includes your form entries or your visitors' data, and nothing is sent if you skip the opt-in or opt out later. See the Freemius Terms of Service (https://freemius.com/terms/) and Privacy Policy (https://freemius.com/privacy/).

= Where does Bina store Contact Form 7 entries, and is it GDPR-friendly? =

In your own WordPress database, nowhere else. Bina hooks into WordPress's privacy tools, so personal data in entries is included in the Export Personal Data and Erase Personal Data requests under Tools. You can also switch off entry storage for any form with the `bina_store_entry` filter.

= What happens to my Contact Form 7 entries if I delete the plugin? =

Deactivating changes nothing: your entries stay in the database and your forms keep working as normal Contact Form 7 forms. Deleting the plugin is different. WordPress runs Bina's cleanup, which drops the entries table along with Bina's own settings and drafts. Export your entries to CSV first if you want to keep them.

== Screenshots ==

1. Generate a Contact Form 7 form with AI: describe it in plain text, review the proposed fields, and it opens ready to edit in the builder.
2. The visual builder: drag fields into rows and columns, with a searchable library that lists tags from your CF7 add-ons too.
3. The forms list: every CF7 form in one place, each with a one-click Migrate to Bina.
4. Importing an existing Contact Form 7 form into an editable draft.
5. The field settings panel, with every CF7 option editable: label, name, placeholder, required, and the raw CF7 options.
6. The front-end preview, rendering the form with your theme's styles.
7. Entries. Contact Form 7 does not store submissions on its own; Bina does, with search, read and unread states, and CSV export.

== Changelog ==

= 1.1.1 =
* Fixed: radio fields looked like checkboxes in the builder. Live forms were never affected.
* Clearer examples in the AI form generator.

= 1.1.0 =
* New: AI form generation. Describe the form you want and your own AI provider drafts it. It runs on your own API key and stays off until an administrator adds one.
* Appearance now has Normal, Hover and Focus states for fields, Normal and Hover for the submit button, field height, and border width and corner radius per side and per corner.
* Required fields show a * beside the label, which you can recolor or hide. Existing forms pick this up after the update.
* Fixed: Minor issues.

= 1.0.2 =
* Added optional, opt-in anonymous usage analytics and a deactivation feedback form (powered by Freemius). No data is sent unless you opt in; form entries never leave your site.
* Added a friendly, one-time prompt (shown after a week of use) inviting happy users to leave a WordPress.org review. Fully optional and dismissible.

= 1.0.1 =
* Improved import accuracy for theme-styled and placeholder-based forms.
* Added detection for forms edited directly in Contact Form 7, with a lock and "Edit with Bina" shortcut in the CF7 editor.
* Minor bug fixes and interface polish.

= 1.0.0 =
* Initial public release: visual drag-and-drop builder for Contact Form 7, one-click import, draft/push workflow with conflict detection and 24-hour rollback, autosave with crash recovery, entry storage with search and CSV export, GDPR export/erase integration, front-end preview, scoped form styling, and full CF7 option round-trip.

== Upgrade Notice ==

= 1.1.1 =
Fixes radio fields looking like checkboxes in the builder. Your forms and entries are untouched.

= 1.1.0 =
Adds optional AI form generation with your own provider key, and Hover and Focus states to the Appearance panel. Your existing forms are untouched until you edit them, and nothing goes to any AI provider until you save a key.

= 1.0.2 =
Adds optional, opt-in anonymous usage analytics and a deactivation feedback form, plus an optional, dismissible prompt inviting long-time users to leave a WordPress.org review. Nothing is sent unless you opt in; your form entries never leave your site.

= 1.0.1 =
Import accuracy improvements and minor bug fixes.

= 1.0.0 =
First public release of Bina, a no-code visual builder for your existing Contact Form 7 forms.
