OneForm: Setup Guide (DRAFT)
OneForm lets one person register their whole household with one embeddable form. It creates a HubSpot contact for the submitter, their spouse, their children and, if you turn it on, emergency contacts. It links them with the association labels Spouse, Parent/Child and Emergency Contact.
1. Requirements
- A HubSpot account, and a user who can install apps in it.
- A website where you can paste an HTML snippet: HubSpot pages, WordPress, or any other site.
- Optional: your own Smarty keys, if you want address lookups.
- Pricing.
2. Install
- Click Install on the OneForm marketplace listing.
- Pick your HubSpot account and approve the permissions listed below.
- During install, OneForm finds or creates the family labels it needs (see section 4).
3. Permissions (scopes) and why we need them
| Scope | What it means in plain words |
|---|---|
oauth |
Lets you connect the app to your HubSpot account securely, without sharing your password. |
crm.objects.contacts.read |
Lets the app look up existing contacts so it can match family members and avoid duplicates. It also lets the app read your existing labels and contact properties. |
crm.objects.contacts.write |
Lets the app create and update contacts for each family member and link them with family labels. |
forms |
Lets the app send the submitter's details through your HubSpot form, so HubSpot records that person's form submission and any marketing opt-in. |
4. How family labels are chosen and reused
- If your account already has suitable family labels, they're reused. For example, Spouse ↔ Head of Household, Child ↔ Parent, or Emergency Contact ↔ Emergency Contact For.
- A single "Child" label is never used for children, because it would label the parent a child as well. Gendered pairs (Husband ↔ Wife) aren't guessed. Guardian ↔ Dependent and Sibling labels are never used.
- Only missing roles are created. If a label name is already taken, the new one gets a different name (for example "Parent" ↔ "Household Child").
- The app saves its label choice. A reinstall keeps the same choice as long as those labels still exist. If a label is deleted, the next submission sets it up again.
- Renaming our labels in HubSpot won't create duplicates.
- Sibling and guardian relationships aren't supported. Children aren't linked to each other.
5. Creating a form
Use the OneForm settings page inside HubSpot to list, create, update, or delete forms. The form builder lists, creates, and updates forms; you can choose fields and allowed websites there and copy the embed code. Delete is available on the settings page and through the shared API. Forms can also still be created with the admin API or CLI.
When you create a form, you'll set:
- The website address(es) where the form will appear. The form only accepts submissions from these sites.
- The questions to ask, and who each question is for: the submitter, spouse, children, emergency contacts, or once for the household. Custom questions can use any writable HubSpot contact property. Read-only, calculated and file properties can't be used.
- Whether to collect emergency contacts (off by default; each one needs a phone number) and how many.
- Optional: the HubSpot form to send the submitter through (it needs first name, last name, email and phone fields), the property that stores birthdates, and a subscription type if you want a marketing opt-in.
The form builder shows your embed code after the form is saved.
Please don't map health details (for example allergies) or other sensitive information to contact properties until HubSpot's sensitive-data terms have been reviewed. TODO (Product): confirm sensitive-data guidance
6. Embedding
Paste this code where the form should appear. Use the form ID we give you.
<div data-household-form="FORM_ID"></div>
<script src="https://household-forms.onrender.com/widget.js" async></script>
7. Test with a sample family
- Open the page that has the form and submit a made-up family: you, a spouse and two children, using test email addresses.
- In HubSpot, open the submitter's contact. You should see the spouse and children linked with family labels.
- Open a child's contact. Both parents should be shown as "Parent".
- Submit the same family again. The existing contacts should be reused.
- The form submission and any opt-in appear only on the submitter's contact.
How matching works:
- Adults are matched by email.
- Children are matched by name, and by birthdate when given, against contacts already linked to the parents.
- Blank answers never erase existing data.
- Non-blank answers from a matched person do update that contact. There's no email verification yet, so anyone who submits a matching email can update that contact's details.
Built-in protections:
- Each form accepts submissions only from its allowed websites.
- A hidden spam-trap field (a honeypot).
- A rate limit per IP address. It applies per server.
- A limit of 20 people per household, in addition to the person filling out the form. Limits for children, adult residents and emergency contacts are set per form; a household can list at most one spouse.
8. Uninstalling
- Uninstall the app from your HubSpot account's connected apps settings. The app's access stops working right away.
- The contacts and labels the app created stay in HubSpot.
- The app doesn't receive a notice when you uninstall, so it doesn't automatically delete what it stores: encrypted tokens, your label choice, form settings, and your Smarty keys if you added them. [TO CONFIRM: deletion policy] To ask us to delete this data, email [SUPPORT EMAIL].
9. Support
Email TODO: support email. See the Support page for what to include in your request.