# Website Forms — Capture Leads from Any Site

_Developers_

There are four ways to get form submissions from a website into CRMown as contacts: forms on a Web Studio site are captured automatically; CRMown Forms can be embedded anywhere or posted to; the Universal Lead Capture script drops a ready-made form on any site; and an Automation webhook trigger accepts any JSON.

## Steps
1. Web Studio site: any ordinary <form> with an email field on a published Web Studio page is captured automatically — the contact is created or matched by email and the submission appears under Forms → Submissions. Give a form a name with data-form-name="Contact us" if you want a clear label.
2. CRMown Forms: build the form in Forms, then use its Embed tab to copy the inline, popup, slide-in or sidebar snippet — or link to the hosted page https://app.crmown.io/f/<form id>.
3. Your own form, posting directly: send a JSON POST to https://app.crmown.io/api/forms/<form id>/submit with keys matching the form's field ids or labels. No API key is needed.
4. Universal Lead Capture: Lead Generation → Website → Install Hub → copy the Lead Capture script and paste it before </body>. Add <div data-crmown-lead-capture></div> where the form should appear.
5. Anything else: in Automation, create a workflow with the "Webhook received" trigger and POST JSON (with an email or contactId) to the URL it shows.

## Tips
- Spam protection on CRMown Forms: include an empty hidden field named _hp_field — bots that fill it get a fake success and nothing is saved. If you connect reCAPTCHA or Turnstile in Settings, send its token as g-recaptcha-response, cf-turnstile-response or _captchaToken.
- UTM parameters (utm_source, utm_medium…), _referrer and _landingPage sent with a submission are recorded for attribution.
- Every submission fires the form.submitted webhook. To put CRMown Form submissions straight onto a pipeline, set the pipeline in the form's settings; otherwise CRMown AI routes the new lead.
- The Universal Lead Capture endpoint allows up to 100 submissions per hour per workspace.
- The Lead Capture script used to be shown without "/api" in its address. Old copies keep working, but use the address above for new installs.

### Embed a CRMown Form inline
```
<div id="crmown-form-FORM_ID"></div>
<script>
(function(){
  var c = document.getElementById('crmown-form-FORM_ID');
  fetch('https://app.crmown.io/api/forms/FORM_ID/embed').then(function(r){return r.json();}).then(function(j){
    c.innerHTML = j.html || '';
    var s = c.querySelectorAll('script');
    for (var i = 0; i < s.length; i++){ var n = document.createElement('script'); n.text = s[i].textContent; document.body.appendChild(n); }
  });
})();
</script>
```

### Submit to a CRMown Form from your own code
```
curl -X POST https://app.crmown.io/api/forms/FORM_ID/submit \
  -H "Content-Type: application/json" \
  -d '{"Name":"Ada Lovelace","Email":"ada@example.com","Message":"Please call me","utm_source":"google"}'
```

### Universal Lead Capture script
```
<script src="https://app.crmown.io/api/embed/lead-capture.js" data-org="YOUR_ORG_ID" async></script>
```
