Collection points on web forms
Per-purpose consent inside your own HTML form.
The consent block adds a consent checkbox and notice wording inside a form you already have, and records the ticks with the person's email when the form is submitted. You add one line to your form. Your form is never blocked, delayed or changed.
Steps
1. Create the collection point
In Pactbase, open Consent Management, then Collection Points. Create one of type Web form, give it a slug (for example newsletter), and map its purposes. The slug is what you paste into the form.
Make sure a Purpose Registry version is published. The block stays hidden until one is.
2. Add the script to the page
The block only works on a page that has the Pactbase script. If the page already shows your cookie banner, it is there. If not, add it.
Copy your own snippet from Settings, then Domains (Copy snippet). It looks like this:
<script src="https://v1.pactbase.in/sdk/v1/pactbase.js" data-org="ORG_ID" data-site="SITE_KEY"></script>Paste it first in the <head> of the page. On a sign-up page that needs the block but no banner, add data-banner="off":
<script src="https://v1.pactbase.in/sdk/v1/pactbase.js" data-org="ORG_ID" data-site="SITE_KEY" data-banner="off"></script>See Install the script for details.
3. Add one line to your form
Paste this one line only, inside your existing form, just above the submit button. Use the slug from step 1:
<div data-pactbase-consent-block="newsletter"></div>Everything else is your own form, unchanged. In context it looks like this — the form, email field and button are already yours; only the highlighted line is new:
<form action="/subscribe" method="post">
<input type="email" name="email" required>
<div data-pactbase-consent-block="newsletter"></div> <!-- add this -->
<button type="submit">Subscribe</button>
</form>The script fills the block with the checkbox and notice wording, and reads the email from the form's email field on submit.
What the person sees
- A Consent purpose gets an unticked checkbox. The law needs an affirmative act.
- A Legitimate use purpose is shown as information only, with a link to the notice, and no checkbox. A "notice shown" record is written for it.
- A link to your notice, in the visitor's language where you have one.
What is recorded
On submit, one consent event with one record per purpose (ticked or not), the email from the form's email field, the collection point, the notice version, the website, and the visitor's IP and browser. A PDF receipt is available, and consent.updated goes to your webhooks. The form's other fields are never read.
- Forms that appear later, as a single-page app switches views, get their block too.
- A repeat submit within a minute is ignored.
- If the call fails, the script keeps the decision and retries.
Forms in an iframe
A script on your page cannot read or change another site's iframe. Google Forms, Typeform, Tally, Jotform and HubSpot's newer embeds run in iframes, so no script can put a checkbox inside them. To check, right-click the form, choose Inspect, and look for an iframe with another site's address. For these, use Forms and CRM tools.