Skip to content

feat(forms): HubSpot lead capture + Pages deploy workflow (closes #7)#9

Open
FabioLeitao wants to merge 1 commit into
mainfrom
fix/hubspot-lead-capture
Open

feat(forms): HubSpot lead capture + Pages deploy workflow (closes #7)#9
FabioLeitao wants to merge 1 commit into
mainfrom
fix/hubspot-lead-capture

Conversation

@FabioLeitao

Copy link
Copy Markdown
Contributor

Summary

  • Removes silent preventDefault on demo and login forms.
  • Demo form (agende-demonstracao.html) posts to HubSpot's public form submit API via js/forms.js.
  • portalId / formGuid are written to js/form-config.js at deploy time from GitHub Actions secrets — no private API keys in the repo.
  • Until secrets are set, visitors see a clear mailto fallback (contact@databoar.com.br).
  • Login form shows an "em breve" message (no credential handling until product SSO exists).
  • Adds docs/HUBSPOT_SETUP.md and .github/workflows/pages-deploy.yml.

Operator follow-up (not in this PR)

  1. Repo Settings → Secrets: HUBSPOT_PORTAL_ID, HUBSPOT_DEMO_FORM_GUID, optional HUBSPOT_REGION
  2. Settings → Pages → Source: GitHub Actions (replaces branch-only publish so secrets inject at deploy)
  3. Align HubSpot form fields per docs/HUBSPOT_SETUP.md

Test plan

  • Without secrets: submit demo form → info message with mailto fallback
  • With secrets + Actions deploy: submit creates HubSpot contact
  • Login submit → em breve message, no network call
  • No API keys in git diff

Partial for/id on demo + login fields (full #2 sweep can follow).

Closes #7

Made with Cursor

Wire agende-demonstracao form to HubSpot public submit API with
portalId/formGuid injected from GitHub Actions secrets at Pages deploy.
Login shows em-breve message; mailto fallback when secrets unset.
Closes #7.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[P1][feature] site: forms não capturam lead (preventDefault) — integrar captura

1 participant