# submit-template.php Complete Field Verification


**Last Updated:** 2025-11-20

**Date:** 2025-11-15  
**Form:** Templates Form (11e392f7-aece-4969-8c39-402ee6cb2330)

## Complete Field Review

### Fields Present in Form (17 total)

**Visible Fields:**

- `firstname` ✅
- `lastname` ✅
- `email` ✅ (required)
- `phone` ✅
- `industry` ✅

**Hidden Fields:**

- `content` ✅
- `sign_up_type__c` ✅
- `hs_lead_status` ✅
- `company_size` ✅
- `source__c` ✅ (utm_source)
- `utm_medium__c` ✅
- `utm_campaign__c` ✅
- `utm_term__c` ✅
- `content__c` ✅ (utm_content)
- `leadsource` ✅
- `partner__c` ✅
- `gclid__c` ✅

### Fields Sent by Code (19 total)

**All Form Fields (15):**

- ✅ email, firstname, lastname, phone
- ✅ content, sign_up_type\_\_c, hs_lead_status
- ✅ industry, company_size
- ✅ source**c, utm_medium**c, utm_campaign**c, utm_term**c, content\_\_c
- ✅ partner**c, gclid**c, leadsource

**Template-Specific Fields (4 - properties exist, need form fields):**

- ⚠️ `template_type__c` (Schichtplan, Dienstplan, or Zeiterfassung)
- ⚠️ `campaign__c` (Template Generator campaign name - separate from utm_campaign\_\_c)
- ⚠️ `template_category__c` (Shift Planning or Duty Planning)
- ⚠️ `lead_source_detail__c` (Template type + Template Download - separate from source\_\_c)

## Code Updates Applied ✅

1. ✅ Added `gclid__c` field (was missing from code)
2. ✅ Added `leadsource` field (was missing from code)
3. ✅ All form fields now being sent correctly

## Verification Results

**Code Status:** ✅ Complete

- Sends all 17 form fields ✅
- Sends 4 additional template-specific fields (need form configuration)

**Form Status:** ⚠️ Needs Configuration

- Has all standard fields ✅
- Missing 4 template-specific fields (properties exist in HubSpot, need to be added to form)

## Missing Fields (Properties Exist, Need Form Fields)

These properties exist in HubSpot but need to be added as hidden fields to the form:

1. **template_type\_\_c**

   - Type: Single-line text or dropdown
   - Values: Schichtplan, Dienstplan, Zeiterfassung
   - Property Group: template_information

2. **campaign\_\_c**

   - Type: Single-line text
   - Description: Template Generator campaign name (e.g., "Schichtplan Generator")
   - Note: Different from `utm_campaign__c` (UTM parameter)

3. **template_category\_\_c**

   - Type: Dropdown
   - Values: Shift Planning, Duty Planning
   - Property Group: template_information

4. **lead_source_detail\_\_c**
   - Type: Single-line text
   - Description: Template type + Template Download (e.g., "Schichtplan Template Download")
   - Note: Different from `source__c` (UTM source)

## Summary

**Code:** ✅ Complete - sends all fields correctly  
**Form:** ⚠️ Needs 4 fields added (properties exist, just need form configuration)
