# Form-to-Page Mapping Reference

**Last Updated:** 2026-03-26

Complete mapping of all HubSpot form endpoints to their usage locations across tools, templates, downloads, webinars, and other pages.

## Consent Handling (GDPR)

**Form categories:**
- **Contact request** (demo, callback, pricing, webinar, event): Always send to HubSpot (Art. 6(1)(b) pre-contractual). Cookie consent not required.
- **Lead gen** (template download, calculator export, gated content): Respect `hubspotConsent`. When false, core delivery works but HubSpot sync is skipped.

**Lead gen form checkbox:** All lead gen forms include an optional consent checkbox (`hubspot_form_consent`). JS reads `formCheckboxChecked || loadConsent()?.hubspot` and passes to API. See `docs/systems/gdpr/FORMS_CONSENT_IMPLEMENTATION.md` for architecture and `docs/systems/gdpr/LEAD_GEN_FORMS_CHECKLIST.md` for QA.

## Overview

This document provides a comprehensive mapping of all form submission endpoints to the pages that use them. This helps developers understand:

- Which forms are used by which pages
- Which HubSpot form GUIDs are associated with each endpoint
- How forms are integrated into different page types

## Form Endpoints Summary

| Endpoint                           | Form GUID                              | Constant                               | Purpose                         | Form Category (GDPR) | Pages Using                     |
| ---------------------------------- | -------------------------------------- | -------------------------------------- | ------------------------------- | -------------------- | ------------------------------- |
| `collect-lead.php`                 | `a91b263c-7ca2-418b-b35c-9664c30e968b` | `HUBSPOT_FORM_GUID_TOOLS`              | Universal tools lead collection | lead_gen             | 9 tool pages                    |
| `submit-template.php`              | `11e392f7-aece-4969-8c39-402ee6cb2330` | `HUBSPOT_FORM_GUID_TEMPLATE`           | Template downloads              | lead_gen             | All `/vorlagen/*` template detail pages |
| `addon-request.php`                | `c2022eda-c9b4-4010-a02d-d920852585b1` | `HUBSPOT_FORM_GUID_ADDON`              | Add-on pricing inquiries        | contact_request      | Pricing pages                   |
| `export-workdays.php`              | `a91b263c-7ca2-418b-b35c-9664c30e968b` | `HUBSPOT_FORM_GUID_WORKDAYS`           | Workdays calculator export      | lead_gen             | `tools_arbeitstage_rechner.php` |
| `shiftops-hubspot.php`             | `41d07332-6697-4daa-b27e-dd60515f9c0f` | `HUBSPOT_FORM_GUID_SHIFTOPS`           | ShiftOps report generation      | lead_gen             | `shiftops-report.php`           |
| `shiftops-nps.php`                 | `804459f7-c18d-4da6-8a0b-a81f44bb8275` | `HUBSPOT_FORM_GUID_SHIFTOPS_NPS`       | ShiftOps NPS surveys            | lead_gen             | `shiftops-report.php`           |
| `lead-capture.php`                 | `9f9d4e35-d8d9-4283-93b6-1a789e0a1281` | `HUBSPOT_FORM_GUID_LEAD_CAPTURE`       | Lead capture popup              | contact_request      | 105+ pages                      |
| `event-lead-capture.php`           | `e9d5fd47-6772-4c0a-943b-8f726afd8e4b` | `HUBSPOT_FORM_GUID_EVENT_LEAD_CAPTURE` | Event/conference lead capture   | contact_request      | `event-lead-capture.php`        |
| `webinar-registration.php`         | `c74e1237-6b52-4a16-bac7-daaf98881e63` | N/A                                    | Product webinars                | contact_request      | 3 webinar pages                 |
| `payroll-webinar-registration.php` | N/A                                    | N/A                                    | Payroll webinars                | contact_request      | `product_payroll_webinar.php`   |

## Tools/Calculators → Form Mapping

### Universal Tools Form (`collect-lead.php`)

**Form GUID:** `a91b263c-7ca2-418b-b35c-9664c30e968b`  
**Constant:** `HUBSPOT_FORM_GUID_TOOLS`  
**Endpoint:** `/v2/api/collect-lead.php`

**Used by 9 tool pages:**

1. **Arbeitstage-Rechner** (`tools_arbeitstage_rechner.php`)

   - Tool name: `Arbeitstage-Rechner`
   - Tool description: `Arbeitstage-Rechner`
   - Export formats: Excel, PDF, CSV

2. **Industrieminuten-Rechner** (`tools_industrieminuten_rechner.php`)

   - Tool name: `Industrieminuten-Rechner`
   - Tool description: `Industrieminuten-Rechner`

3. **Mehrwertsteuer-Rechner** (`tools_mehrwertsteuer_rechner.php`)

   - Tool name: `Mehrwertsteuer-Rechner`
   - Tool description: `Mehrwertsteuer-Rechner`

4. **Midijob-Rechner** (`tools_midijob_rechner.php`)

   - Tool name: `Midijob-Rechner`
   - Tool description: `Midijob Netto-Gehalt Berechnung`

5. **Stundenlohn-Rechner** (`tools_stundenlohnrechner.php`)

   - Tool name: `Stundenlohn-Rechner`
   - Tool description: `Stundenlohn-Rechner`

6. **TVöD-SuE Gehaltsrechner** (`tools_tvoed_sue.php`)

   - Tool name: `TVöD-SuE Gehaltsrechner`
   - Tool description: `TVöD-SuE Gehaltsrechner`

7. **Urlaubsanspruch-Rechner** (`tools_urlaubsanspruchrechner.php`)

   - Tool name: `Urlaubsanspruch-Rechner`
   - Tool description: `Urlaubsanspruch-Rechner`

8. **Zinseszins-Rechner** (`tools_zinseszinsrechner.php`)

   - Tool name: `Zinseszins-Rechner`
   - Tool description: `Zinseszins-Rechner`

9. **Zuschlags-Rechner** (`tools_zuschlagsrechner.php`)
   - Tool name: `Zuschlags-Rechner`
   - Tool description: `Zuschlags-Rechner`

**Note:** Some tools (e.g., `tools_prozentrechner.php`, `tools_minijob_rechner.php`, `tools_arbeitslosengeld_rechner.php`, `tools_arbeitszeitrechner.php`, `tools_einkommensteuer_rechner.php`) may use different implementations or shared email modal components. See [Shared Components Documentation](../shared-components/README.md) for details.

### Workdays Export Form (`export-workdays.php`)

**Form GUID:** `a91b263c-7ca2-418b-b35c-9664c30e968b` (same as tools form)  
**Constant:** `HUBSPOT_FORM_GUID_WORKDAYS`  
**Endpoint:** `/v2/api/export-workdays.php`

**Used by:**

- `tools_arbeitstage_rechner.php` - For Excel/PDF/CSV export functionality

**Note:** Uses the same HubSpot form as the universal tools form but with different tracking fields (`sign_up_type__c: "Tools Page"`, `content: "Arbeitstage-Rechner"`).

## Templates → Form Mapping

### Template Download Form (`submit-template.php`)

**Form GUID:** `11e392f7-aece-4969-8c39-402ee6cb2330`  
**Constant:** `HUBSPOT_FORM_GUID_TEMPLATE`  
**Endpoint:** `/v2/api/submit-template.php`

**Used by 3 template pages:**

1. **Dienstplan Template** (`templates_dienstplan.php`)

   - Content type: `Dienstplan Vorlage - Template`
   - Template ID: `dienstplan`
   - Form ID: `template-download-dienstplan`

2. **Schichtplan Template** (`templates_schichtplan.php`)

   - Content type: `Schichtplan Vorlage - Template`
   - Template ID: `schichtplan`
   - Form ID: `template-download-schichtplan`

3. **Template Generator** (`templates_template.php`)
   - Content type: Dynamic (based on `$templateContentType`)
   - Template ID: Dynamic (from `$templateId`)
   - Form ID: `template-download-{templateId}`

**Form Fields:**

- `email` (required)
- `firstname` (required)
- `lastname` (required)
- `phone` (optional)
- `industry` (optional, defaults to 'gastronomie' for Schichtplan)
- `company_size` (optional, defaults to '1')
- `content_type` (hidden, template type)
- `template_type` (optional, format: 'Excel' or 'Google Sheets', defaults to 'Excel')
- `sign_up_type__c` (hidden, "Template Download")
- UTM parameters (hidden)
- `hubspotutk` (from cookie)

**HubSpot Properties:**

- `template_type__c` - Set to 'Excel' or 'Google Sheets' based on user's format selection
- `template_category__c` - Set to 'Shift Planning' or 'Duty Planning' based on template type

## Downloads → Form Mapping

### Gated Content Form (`/form-hs` handler)

**Form GUID:** `c74e1237-6b52-4a16-bac7-daaf98881e63`  
**Handler:** `html/form-hs.php`  
**Component:** `v2/base/include_form-gated-content.php`

**Used by download pages:**

1. **Zeiterfassung Whitepaper** (`download_zeiterfassung.php`)

   - Form ID: `content-form`
   - Content type: Zeiterfassung Whitepaper

2. **Onboarding Checklist** (`download_onboarding_checklist.php`)

   - Form ID: `content-form`
   - Content type: Onboarding Checkliste Gastronomie

3. **Other download pages** (check individual pages for specific content types)

**Form Fields:**

- Standard contact fields (name, email, phone, company)
- `content` (hidden, content piece name)
- `sign_up_type__c` (hidden, "Gated Content")
- UTM parameters (hidden)

## Webinars → Form Mapping

### Product Webinar Registration (`webinar-registration.php`)

**Form GUID:** `c74e1237-6b52-4a16-bac7-daaf98881e63` (via `/form-hs` handler)  
**Endpoint:** `/v2/api/webinar-registration.php`

**Used by:**

1. **Product Webinar** (`product_webinar.php`)

   - Webinar type: Product
   - `sign_up_type__c`: "Webinar Registration"
   - `content`: "Produkt"

2. **Trinkgeld Webinar** (`webinar_trinkgeld.php`)
   - Webinar type: Trinkgeld
   - `sign_up_type__c`: "Webinar Registration"
   - `content`: Dynamic (webinar type)

**Form Fields:**

- `full_name` (required)
- `email` (required)
- `phone` (optional)
- `webinar_date` (required)
- UTM parameters
- `hubspotutk`

### Payroll Webinar Registration (`payroll-webinar-registration.php`)

**Endpoint:** `/v2/api/payroll-webinar-registration.php`

**Used by:**

1. **Payroll Webinar** (`product_payroll_webinar.php`)
   - Webinar type: Payroll
   - `sign_up_type__c`: "Webinar Registration"
   - `content`: "Payroll"

**Form Fields:**

- `full_name` (required)
- `email` (required)
- `phone` (optional)
- `webinar_date` (required)
- UTM parameters
- `hubspotutk`

## ShiftOps → Form Mapping

### ShiftOps Report Form (`shiftops-hubspot.php`)

**Form GUID:** `41d07332-6697-4daa-b27e-dd60515f9c0f`  
**Constant:** `HUBSPOT_FORM_GUID_SHIFTOPS`  
**Endpoint:** `/v2/api/shiftops-hubspot.php`

**Used by:**

1. **ShiftOps Report Page** (`shiftops-report.php`)
   - Form ID: `unlock-form`
   - Purpose: Unlock ShiftOps report after email collection
   - `sign_up_type__c`: "Tools Page"
   - `content`: "ShiftOps"

**Form Fields:**

- `firstname` (required)
- `lastname` (required)
- `email` (required)
- `phone` (optional)
- `shiftops_business_name` (optional)
- `shiftops_index` (optional)
- `shiftops_grade` (optional)
- `shiftops_place_id` (optional)
- UTM parameters
- `hubspotutk`

### ShiftOps NPS Form (`shiftops-nps.php`)

**Form GUID:** `804459f7-c18d-4da6-8a0b-a81f44bb8275`  
**Constant:** `HUBSPOT_FORM_GUID_SHIFTOPS_NPS`  
**Endpoint:** `/v2/api/shiftops-nps.php`

**Used by:**

1. **ShiftOps Report Page** (`shiftops-report.php`)
   - Form ID: NPS survey form
   - Purpose: Collect NPS feedback after report generation
   - `sign_up_type__c`: "Tools Page"
   - `content`: "ShiftOps NPS"

**Form Fields:**

- `email` (required)
- `nps_score` (required, 0-10)
- `nps_feedback` (optional)
- `shiftops_business_name` (optional)
- `shiftops_index` (optional)
- `shiftops_grade` (optional)
- `shiftops_place_id` (optional)
- `nps_survey_version` (optional)

## Lead Capture Popup → Page Mapping

### Lead Capture Popup (`lead-capture.php`)

**Form GUID:** `9f9d4e35-d8d9-4283-93b6-1a789e0a1281`  
**Constant:** `HUBSPOT_FORM_GUID_LEAD_CAPTURE`  
**Endpoint:** `/v2/api/lead-capture.php`  
**Component:** `v2/components/lead-capture-popup.php`  
**Trigger Script:** `v2/js/lead-capture-triggers.js`

**Used by 105+ pages:**

The lead capture popup is included on most pages across the site. Pages include:

- **All comparison pages** (`compare_*.php`) - 67+ pages
- **All product pages** (`product_*.php`, `schichtplan.php`, `zeiterfassung.php`, etc.)
- **All industry pages** (`industry_*.php`)
- **All template pages** (`templates_*.php`)
- **All download pages** (`download_*.php`)
- **All webinar pages** (`webinar_*.php`, `product_webinar.php`)
- **Homepage** (`landingpage.php`, `landingpage_v3.php`)
- **Pricing pages** (`static_pricing_new.php` for `/preise`; legacy `static_pricing.php`)
- **Other static pages**

**Integration Pattern:**

```php
<!-- Before closing </body> tag -->
<?php include '../components/lead-capture-popup.php'; ?>
<script src="/v2/js/lead-capture-triggers.min.js?v=<?php echo filemtime(__DIR__ . '/../js/lead-capture-triggers.min.js'); ?>"></script>
```

**Form Fields (Step 1):**

- `name` (required)
- `phone` (required)
- `sourcePage` (auto-detected)
- `leadSource` (auto-detected)
- `triggerType` (auto-detected)
- UTM parameters
- `hubspotutk`

**Form Fields (Step 2):**

- `email` (optional)
- `notes` (optional)
- `callPreference` (optional)

## Add-on Pricing → Form Mapping

### Add-on Pricing Form (`addon-request.php`)

**Form GUID:** `c2022eda-c9b4-4010-a02d-d920852585b1`  
**Constant:** `HUBSPOT_FORM_GUID_ADDON`  
**Endpoint:** `/v2/api/addon-request.php`

**Used by:**

1. **Pricing Pages** (`static_pricing_new.php` — canonical `/preise`)

   - Component: `v2/base/sections/pricing-addons.php`
   - Form ID: `addonForm`
   - Addon types: Payroll Plus, Zeiterfassung Plus, Schichtplanung Plus, Dokumentenmanagement Plus, Digitale Personalakte Plus, Enterprise

2. **Excel Generator** (uses same form GUID)
   - Constant: `HUBSPOT_FORM_GUID_EXCEL`
   - Same form as add-on pricing

**Form Fields:**

- `email` (required)
- `firstname` (required)
- `lastname` (required)
- `phone` (optional)
- `company` (optional)
- `addon` (required, addon name)
- `sign_up_type__c` (normalized: "Add-on Pricing Inquiry" or "Enterprise Pricing Inquiry")
- `content` (addon name)
- UTM parameters
- `hubspotutk`

## Form Integration Patterns

### Pattern 1: Direct API Call (Tools, Templates)

```javascript
fetch("/v2/api/collect-lead.php", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    email: email,
    name: name,
    tool_name: "Tool Name",
    tool_description: "Tool Description",
    tool_data: calculationData,
    // ... UTM parameters
    hubspotutk: hubspotutk,
  }),
});
```

### Pattern 2: Form Handler (`/form-hs`)

```html
<form id="content-form" action="/form-hs" method="POST">
  <!-- Form fields -->
  <input type="hidden" name="formtitle" value="Content Form" />
  <input type="hidden" name="formtype" value="content" />
</form>
```

### Pattern 3: HubSpot Embedded Form

```javascript
hbspt.forms.create({
  portalId: "145133546",
  formId: "ad1036ce-33ec-463b-adde-2fa546324c8a",
  region: "eu1",
  target: "#form-container",
});
```

### Pattern 4: Lead Capture Popup (Component)

```php
<?php include '../components/lead-capture-popup.php'; ?>
<script src="/v2/js/lead-capture-triggers.min.js"></script>
```

## Form GUID Registry

All form GUIDs are centralized in `v2/config/hubspot-config.php`:

| Constant                         | GUID                                   | Used By                         |
| -------------------------------- | -------------------------------------- | ------------------------------- |
| `HUBSPOT_FORM_GUID_LEAD_CAPTURE` | `9f9d4e35-d8d9-4283-93b6-1a789e0a1281` | Lead capture popup              |
| `HUBSPOT_FORM_GUID_TOOLS`        | `a91b263c-7ca2-418b-b35c-9664c30e968b` | Tools, workdays export          |
| `HUBSPOT_FORM_GUID_TEMPLATE`     | `11e392f7-aece-4969-8c39-402ee6cb2330` | Template downloads              |
| `HUBSPOT_FORM_GUID_ADDON`        | `c2022eda-c9b4-4010-a02d-d920852585b1` | Add-on pricing, Excel generator |
| `HUBSPOT_FORM_GUID_SHIFTOPS`     | `41d07332-6697-4daa-b27e-dd60515f9c0f` | ShiftOps reports                |
| `HUBSPOT_FORM_GUID_SHIFTOPS_NPS` | `804459f7-c18d-4da6-8a0b-a81f44bb8275` | ShiftOps NPS surveys            |
| `HUBSPOT_FORM_GUID_WORKDAYS`     | `a91b263c-7ca2-418b-b35c-9664c30e968b` | Workdays export (same as tools) |
| `HUBSPOT_FORM_GUID_EXCEL`        | `c2022eda-c9b4-4010-a02d-d920852585b1` | Excel generator (same as addon) |
| `HUBSPOT_FORM_GUID_PARTNER_REFER_LEAD` | `8b952683-e95b-45f2-a568-86725114cd27` | Ordio Loop partner manual refer (`/v2/api/affiliate-partner-refer-lead.php`, `/partner/leads`) |

**Additional Form GUIDs (hardcoded in handlers):**

- Main Lead Capture: `9b93ee13-fad2-4ce8-8ea2-4e588932af2a`
- Demo Form: `535143d6-9521-45b0-bea3-c13b078b8668`
- Content/Webinar/Event: `c74e1237-6b52-4a16-bac7-daaf98881e63`
- Hero Email: `c1d24914-f2a2-4371-b12a-7217553f5897`
- SDR Form: `ad1036ce-33ec-463b-adde-2fa546324c8a`

## Related Documentation

- [Form Configuration Reference](FORM_CONFIGURATION_REFERENCE.md) - Complete form configuration guide
- [HubSpot API Reference](../apis/HUBSPOT_API_REFERENCE.md) - Complete API endpoint documentation
- [Shared Components Documentation](../shared-components/README.md) - Component usage and integration
- [Form Tracking Guide](../../forms/FORM_TRACKING_DEVELOPER_GUIDE.md) - GTM form tracking implementation
- [Lead Capture System](../../systems/lead-capture/README.md) - Lead capture popup documentation
