submitLead
Submit a lead to HomePages.
Submit a lead to HomePages.
Handles signing, the idempotency key, source attribution, and retry. Never
throws — inspect the returned result. Field precedence into the submitted
payload is extra < the named contact fields < source attribution, so extra
can add fields but never shadow them.
Off a published page — the editor canvas, or local preview — there is no site
config, so nothing is sent and the result is { ok: true, simulated: true }.
Import from @homepages/template-kit/browser.
Signature
Section titled “Signature”function submitLead(input: LeadInput, options?: SubmitLeadOptions): Promise<SubmitLeadResult>Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
input |
LeadInput |
required | |
options |
SubmitLeadOptions |
optional |
Returns
Section titled “Returns”Promise<SubmitLeadResult>