Creating a client
FormsOption values:
| Option | Description |
|---|---|
paubox.WithFormsBaseURL(url) | Override the Forms API base URL |
paubox.WithFormsHTTPClient(c) | Supply a custom *http.Client |
paubox.WithFormsTimeout(d) | Set a per-request timeout |
paubox.WithFormsRetry(cfg) | Configure retry behavior |
paubox.WithFormsUserAgent(s) | Append to the User-Agent header |
Get a form
Retrieve a form’s metadata, field schema, and rendered HTML/CSS:Form struct includes:
| Field | Description |
|---|---|
Title | Display name of the form |
FormJSON | Parsed field schema (FormJSON.Body is []FormField) |
HTML | Rendered HTML for embedding |
CSS | Associated stylesheet |
Submit a form
Submitting with file attachments
Attach files by base64-encoding their content:FormAttachment struct:
| Field | Type | Description |
|---|---|---|
Name | string | File name including extension |
Content | string | Base64-encoded file content |