=== Propozit – Proposal Request Form ===
Contributors: propozit
Tags: proposal, quote, request form, lead form, agency
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A "Request a proposal" form for your site. Each request becomes a client in Propozit, with a draft proposal for you to check.

== Description ==

Propozit is proposal software for freelancers and agencies. This plugin puts a "Request a proposal" form on any page of your WordPress site.

When a visitor sends the form:

* Propozit adds them as a client, with their contact details and their request in the client's notes.
* By default, Propozit's AI also writes a draft proposal from what they asked for, with your own prices, cases and templates.
* You check the draft in Propozit and send it yourself. Nothing is ever sent to the visitor automatically.

The form asks for a name, email, company (optional), website (optional), phone (optional), what they need, a budget (optional) and their consent, with a link to your privacy policy.

= Features =

* A block (Propozit request form) and a shortcode: `[propozit_request]`.
* Choose what a request creates: a client and an AI draft, or only a client.
* An optional proposal type for the AI draft.
* The form in English, Dutch or Thai, or in your site's language.
* Spam protection without a third-party captcha: a hidden honeypot field, a time check, a nonce and at most 5 requests an hour from one IP address.
* An email to you with each request, so none is lost if Propozit can't be reached.
* Works without JavaScript; with it, the form is sent without reloading the page.

You need a Propozit account (there is a free plan) and an API key with Read and write access.

== Installation ==

1. In WordPress, go to Plugins → Add New → Upload Plugin, choose `propozit.zip` and select Install Now. Then select Activate.
2. In Propozit, open Settings → API and webhooks. Select Create key, choose Read and write, and copy the key.
3. In WordPress, open Settings → Propozit, paste the key and select Save Changes. The page says which organization it connected to.
4. Add the Propozit request form block to a page, or type `[propozit_request]` in any page or post.

== Frequently Asked Questions ==

= Does the visitor get an email or a proposal? =

No. The visitor sees a short thank-you on the page. The client and the draft wait in Propozit until you check and send the proposal yourself.

= What happens when the client already exists in Propozit? =

When a client has a contact with the same email, or the same company name, that client is used and its details are not changed. The AI draft is made for that client.

= What if the visitor leaves Company empty? =

They are a private person, and the client in Propozit gets their name. When another client already has that name, the new client is named "Name (email)", so two people with the same name never share a client.

= What if Propozit can't be reached? =

The visitor still sees the thank-you when the request reached you by email (turn on "Email me" in the settings). Settings → Propozit shows the last problem, so you can fix the key or add the client yourself.

= Do AI drafts cost anything? =

AI drafts count toward your Propozit plan's AI limit, as drafts you start in the app do. Choose "Only a client" to make no drafts.

= Can I use the form in another language? =

Yes. Pick English, Dutch or Thai under Settings → Propozit, or per block in the block's settings, or with the shortcode: `[propozit_request lang="nl"]`. Leave it empty to follow your site's language.

= My site uses page caching. Does the form still work? =

Yes. The form's script asks your site for a fresh security token before it sends, so a cached page works.

= My site is behind a proxy or CDN, and every visitor has the same IP address. =

The hourly limit then counts all visitors together. Use the `propozit_client_ip` filter to return the visitor's real address from your proxy's header, or `propozit_requests_per_hour` to change the limit.

= Where is my API key stored? =

In your WordPress database, encrypted with your site's own salt where your server supports it. It is never shown on a page, put in JavaScript or sent anywhere but Propozit's API. Only administrators can change it.

== External services ==

This plugin connects to Propozit (https://propozit.com), a proposal service run by We Do Dev Work Co., Ltd. It needs Propozit to work: the form's requests are created there.

* When you save or test your API key in Settings → Propozit, the plugin calls Propozit's API (https://propozit.com/api/v1/me) to check the key. It sends only the key.
* When a visitor sends the form, the plugin sends the request (see Privacy below) to Propozit's API at https://propozit.com/api/v1, to look up or create the client and, if you chose it, start a draft proposal.
* When you open the settings page, the plugin may fetch your Propozit proposal types (https://propozit.com/api/v1/templates) to fill the list. It sends only the key.

Propozit's terms: https://propozit.com/terms. Propozit's privacy policy: https://propozit.com/privacy.

== Privacy ==

This plugin sends what a visitor types in the form (name, email, company, website, phone, what they need and budget), the page address and your site's name to Propozit's API at https://propozit.com/api/v1, using your own API key. It is stored in your Propozit organization in the EU (Frankfurt). With the AI draft on, the request (without the email address or phone number) is used to write the draft; Propozit's AI features currently run on Anthropic in the US.

The plugin makes no other outside requests, adds no tracking or cookies, and stores no requests in WordPress. To limit spam, it keeps a hashed form of the visitor's IP address in a temporary value for one hour. With "Email me" on, each request is also emailed to the address you choose.

Add to your privacy policy that requests from the form are passed to Propozit. Propozit's privacy policy: https://propozit.com/privacy. Terms: https://propozit.com/terms. Subprocessors: https://propozit.com/subprocessors.

== Screenshots ==

1. The request form on a page.
2. Settings → Propozit.

== Changelog ==

= 1.0.0 =
* First version: block and shortcode, client and AI draft, English, Dutch and Thai, spam protection, owner email.

== Upgrade Notice ==

= 1.0.0 =
First version.
