A Salesforce app that lets you create public web forms that submit Cases with file attachments. Built for the AppExchange.
The following reCAPTCHA items need manual verification before release:
- Create reCAPTCHA v3 keys at Google Admin Console (select "v3")
- Configure v3 in Setup Wizard (select "v3 Score-based" type)
- Test form submission with v3 - verify invisible badge appears
- Verify low-score submissions are blocked (use VPN/incognito to simulate bot-like behavior)
- Test switching between v2 Checkbox, v2 Invisible, and v3 Score-based
| Version | v0.4.8 |
| Phases Complete | 0-3 (MVP, Admin UI, Setup Wizard, reCAPTCHA) |
| Next Up | Phase 4 (Embeddable widget, multi-file upload) |
| Dev Org | devorg ([email protected]) |
| GitHub | https://github.com/tilman-d/salesforce-webtocase |
| Last Change | Allow changing reCAPTCHA type without re-entering secret key |
Salesforce's native Web-to-Case doesn't support file attachments. This app solves that problem with:
- Configurable forms stored as custom objects
- Public Visualforce page for form rendering
- File attachments via ContentVersion/ContentDocumentLink
- LWC Admin UI for managing forms without using Setup
- Google reCAPTCHA v2 for spam protection
- Error logging for debugging
| Phase | Description | Status |
|---|---|---|
| Phase 0 | MVP - Core form submission | ✅ Complete |
| Phase 1 | Admin UI (LWC form builder) | ✅ Complete |
| Phase 2 | Post-Install Setup Wizard | ✅ Complete |
| Phase 3 | reCAPTCHA integration | ✅ Complete |
| Phase 4 | Embeddable widget, multi-file upload | 🔜 Next up |
- Form__c - Form configuration (name, title, description, file upload settings)
- Form_Field__c - Field definitions (label, type, Case field mapping, required, sort order)
- Error_Log__c - Error logging for debugging
- CaseFormController - Main controller for form rendering and submission
- ErrorLogger - Utility for logging errors
- CaseFormPage - Public form page that renders dynamically based on Form__c configuration
- caseFormStyles.css - Clean, responsive form styling
- caseFormScript.js - Client-side validation and form submission
Access via the Form Manager tab in Salesforce.
Features:
- List all forms with field counts and created date
- Sortable columns - click column headers to sort (Form Name, Title, Fields, Active, Created)
- Create new forms
- Edit existing forms (click form name to edit)
- Delete forms with confirmation modal
- Toggle form active/inactive status
- Add, edit, delete, and reorder fields
- Preview forms with "View Live" button
- URL hash routing for bookmarkable links (
#new,#edit/{formId}) - Form name validation (unique, URL-safe)
- Toast notifications for success/error feedback
- FormAdminController - CRUD operations for Form__c and Form_Field__c with wrapper classes
- FormAdminControllerTest - 33 unit tests, 94%+ code coverage
- formAdminApp - Main container with list view, routing, and delete modal
- formDetail - Form settings editor with inline field management
- Form_Manager.flexipage-meta.xml - Lightning App Page
- Form_Manager.tab-meta.xml - Navigation tab
- Added FormAdminController class access
- Added Form_Manager tab visibility
Access via the Setup Wizard tab or the Web-to-Case Forms app in the App Launcher.
6-Step Wizard Flow:
- Welcome - Precondition checks (My Domain, admin permissions, Sites enabled)
- Select Site - Choose from existing Sites or get instructions to create one
- Configure - Auto-configure Guest User object/field permissions with security acknowledgment
- Verify - Manual configuration instructions for Apex class and VF page access with validation
- reCAPTCHA - Configure Google reCAPTCHA API keys (optional, can skip)
- Complete - Simplified 2-box layout:
- "Test Your Setup" box: Sample form creation (optional), Test Form button, Public URL with copy
- "What's Next" box: Link to Form Manager
Features:
- Automatic detection of active Salesforce Sites
- One-click permission configuration for Guest User profile
- Support for both Enhanced Profile UI and Classic Profile UI instructions
- Validation to ensure all permissions are correctly configured
- reCAPTCHA configuration UI - Enter Site Key and Secret Key without Anonymous Apex
- Sample "Contact Support" form creation
- Dynamic public URL generation (works with Enhanced Domains)
- SetupWizardController - Site detection, permission configuration, validation, sample form creation, reCAPTCHA settings management
- SetupWizardControllerTest - Unit tests with coverage (41 tests)
- setupWizard - Multi-step wizard with progress indicator
- Setup_Wizard.flexipage-meta.xml - Lightning App Page
- Setup_Wizard.tab-meta.xml - Navigation tab
- Web_to_Case_Forms.app-meta.xml - Lightning App (consolidates all functionality)
- Added SetupWizardController class access
- Added Setup_Wizard tab visibility
- Added Web_to_Case_Forms app visibility
Protects public forms from spam and bot submissions with "I'm not a robot" checkbox verification.
Features:
- Per-form CAPTCHA toggle (
Enable_Captcha__cfield on Form__c) - Protected Custom Setting for API keys (
reCAPTCHA_Settings__c) - Client-side reCAPTCHA widget rendering
- Server-side token verification via Google API
- Graceful error handling with user-friendly messages
- Admin UI toggle in Form Manager
- reCAPTCHA_Settings__c - Protected hierarchy Custom Setting
Site_Key__c- Public key for widget renderingSecret_Key__c- Private key for server-side verification
- Enable_Captcha__c - Checkbox to enable/disable CAPTCHA per form
- Google_reCAPTCHA - Allows callouts to
https://www.google.comfor token verification
- CaseFormController.cls - Added
verifyCaptcha()method,getCaptchaSiteKey(),getCaptchaEnabled() - CaseFormPage.page - Conditionally loads reCAPTCHA script and renders widget
- caseFormScript.js - Handles CAPTCHA token extraction and submission
- caseFormStyles.css - Styling for CAPTCHA widget and error messages
- formDetail LWC - Added "Enable CAPTCHA" toggle in form settings
- Added
Enable_Captcha__cfield permission (Read/Edit)
- CaseFormControllerTest - 22 tests including 9 CAPTCHA-specific tests with HTTP mocks
- 88% code coverage on CaseFormController
Use this checklist to verify reCAPTCHA integration in your org:
- Go to Google reCAPTCHA Admin Console
- Create a new site with reCAPTCHA v2 "I'm not a robot" checkbox
- Add your Salesforce Site domain (e.g.,
yourorg.my.salesforce-sites.com) - Copy the Site Key and Secret Key
- Go to Setup Wizard tab (or run the wizard from App Launcher → "Web-to-Case Forms")
- If you already completed setup, navigate to Step 5 (reCAPTCHA)
- Enter your Site Key and Secret Key
- Click Save reCAPTCHA Settings
- Proceed to Complete step
Alternative (Anonymous Apex):
reCAPTCHA_Settings__c settings = reCAPTCHA_Settings__c.getOrgDefaults();
settings.Site_Key__c = 'YOUR_SITE_KEY_HERE';
settings.Secret_Key__c = 'YOUR_SECRET_KEY_HERE';
upsert settings;- Go to Form Manager tab
- Click New Form or edit an existing form
- Check the Enable CAPTCHA checkbox
- Add at least one required field (e.g., Name, Email, Subject)
- Check Active
- Click Save
- Click View Live to open the form in a new tab
- Verify the reCAPTCHA widget ("I'm not a robot") appears below the form fields
- Test 1: Submit without CAPTCHA
- Fill in all required fields
- Do NOT click the CAPTCHA checkbox
- Click Submit
- Verify error message: "Please complete the CAPTCHA verification."
- Test 2: Submit with CAPTCHA
- Fill in all required fields
- Click the reCAPTCHA checkbox (wait for green checkmark)
- Click Submit
- Verify success message with case number
- Go to Cases tab in Salesforce
- Find the newly created case
- Verify the case fields match your form submission
- Create or edit a form with Enable CAPTCHA unchecked
- View the form publicly
- Verify NO reCAPTCHA widget appears
- Submit the form and verify it works without CAPTCHA
- Go to Form Manager tab
- Verify the Enable CAPTCHA checkbox appears in form settings
- Verify the help text explains reCAPTCHA requirements
- Toggle CAPTCHA on/off and save - verify it persists
| Issue | Solution |
|---|---|
| reCAPTCHA widget doesn't appear | Check that reCAPTCHA_Settings__c has Site Key configured |
| "CAPTCHA verification failed" on submit | Verify Secret Key is correct in Custom Settings |
| Form hangs on submit | Check browser console for errors; verify Remote Site Setting exists |
| Error: "Unauthorized endpoint" | Add Remote Site Setting for https://www.google.com |
- Salesforce CLI (
sf) installed - Access to a Salesforce org (Developer Edition or Sandbox)
sf org login web --alias myorg
sf project deploy start --target-org myorg
sf apex run test --target-org myorg --test-level RunLocalTestsRun this anonymous Apex to create a sample form:
Form__c form = new Form__c(
Form_Name__c = 'support',
Title__c = 'Contact Support',
Description__c = 'We\'ll get back to you within 24 hours.',
Success_Message__c = 'Thank you! Your case has been submitted.',
Active__c = true,
Enable_File_Upload__c = true,
Enable_Captcha__c = true // Enable CAPTCHA
// Note: File limits are fixed (Images: 25MB auto-compressed, Documents: 2MB)
);
insert form;
List<Form_Field__c> fields = new List<Form_Field__c>{
new Form_Field__c(Form__c = form.Id, Field_Label__c = 'Your Name', Field_Type__c = 'Text', Case_Field__c = 'SuppliedName', Required__c = true, Sort_Order__c = 1),
new Form_Field__c(Form__c = form.Id, Field_Label__c = 'Email Address', Field_Type__c = 'Email', Case_Field__c = 'SuppliedEmail', Required__c = true, Sort_Order__c = 2),
new Form_Field__c(Form__c = form.Id, Field_Label__c = 'Subject', Field_Type__c = 'Text', Case_Field__c = 'Subject', Required__c = true, Sort_Order__c = 3),
new Form_Field__c(Form__c = form.Id, Field_Label__c = 'Message', Field_Type__c = 'Textarea', Case_Field__c = 'Description', Required__c = true, Sort_Order__c = 4)
};
insert fields;Or use the Form Manager tab to create forms via the UI (Phase 1).
- Setup → Sites → Register your domain
- Create new site:
- Site Label:
Support - Site Name:
support(orsfor shorter URL) - Active Site Home Page:
CaseFormPage
- Site Label:
- Activate the site
On the Site detail page → Public Access Settings:
Object Permissions:
| Object | Read | Create |
|---|---|---|
| Form__c | ✓ | |
| Form_Field__c | ✓ | |
| Case | ✓ | |
| ContentVersion | ✓ | |
| ContentDocumentLink | ✓ | |
| Error_Log__c | ✓ |
Field Permissions (Form__c): Read access to Description__c, Enable_File_Upload__c, Success_Message__c, Enable_Captcha__c
Field Permissions (Form_Field__c): Read access to Required__c
Apex Class Access: CaseFormController, ErrorLogger
VF Page Access: CaseFormPage
- Get API keys from Google reCAPTCHA Admin
- Setup → Custom Settings → reCAPTCHA Settings → Manage → New
- Enter Site Key and Secret Key
Access: https://[your-domain].my.salesforce-sites.com/support/CaseFormPage?name=support
- Navigate to the Form Manager tab in Salesforce
- Click New Form to create a form
- Fill in form settings:
- Form Name: URL-safe identifier (lowercase, hyphens only)
- Title: Display title shown on the form
- Description: Instructions shown at the top
- Success Message: Shown after submission
- Active: Toggle to enable/disable the form
- Enable File Upload: Allow file attachments
- Enable CAPTCHA: Require reCAPTCHA verification (Phase 3)
- Add fields in the Form Fields section
- Click Save
- Use View Live to preview the form
- Embeddable JavaScript widget (for non-Salesforce sites)
- Multi-file upload
- Custom field types (picklist, date)
- Form analytics/submission tracking
force-app/main/default/
├── applications/
│ └── Web_to_Case_Forms.app-meta.xml # Phase 2 - Lightning App
├── objects/
│ ├── Form__c/ # Form configuration
│ │ └── fields/
│ │ ├── Enable_Captcha__c # Phase 3
│ │ └── Site_Id__c # URL Display Feature
│ ├── Form_Field__c/ # Field definitions
│ ├── Error_Log__c/ # Error logging
│ └── reCAPTCHA_Settings__c/ # Phase 3 - API keys + Site settings
│ └── fields/
│ ├── Site_Key__c
│ ├── Secret_Key__c
│ ├── Captcha_Type__c
│ ├── Score_Threshold__c
│ ├── Default_Site_Id__c # URL Display Feature
│ └── Default_Site_Base_Url__c # URL Display Feature
├── classes/
│ ├── CaseFormController.cls
│ ├── CaseFormControllerTest.cls
│ ├── ErrorLogger.cls
│ ├── ErrorLoggerTest.cls
│ ├── FormAdminController.cls # Phase 1
│ ├── FormAdminControllerTest.cls # Phase 1
│ ├── SetupWizardController.cls # Phase 2
│ └── SetupWizardControllerTest.cls # Phase 2
├── lwc/
│ ├── formAdminApp/ # Phase 1 - Main admin container
│ ├── formDetail/ # Phase 1 - Form editor (+ CAPTCHA toggle)
│ └── setupWizard/ # Phase 2 - Setup wizard
├── flexipages/
│ ├── Form_Manager.flexipage-meta.xml # Phase 1
│ └── Setup_Wizard.flexipage-meta.xml # Phase 2
├── tabs/
│ ├── Form_Manager.tab-meta.xml # Phase 1
│ └── Setup_Wizard.tab-meta.xml # Phase 2
├── pages/
│ └── CaseFormPage.page # + reCAPTCHA widget (Phase 3)
├── staticresources/
│ ├── caseFormStyles.css # + CAPTCHA styles (Phase 3)
│ ├── caseFormScript.js # + compression & validation
│ └── imageCompression.js # browser-image-compression library
├── remoteSiteSettings/
│ └── Google_reCAPTCHA.remoteSite-meta.xml # Phase 3
└── permissionsets/
└── Web_to_Case_Admin.permissionset-meta.xml
- Verify Form__c record exists with matching
Form_Name__c - Verify
Active__c = true - Check Guest User has Read access to Form__c
- For preview mode, add
?preview=trueto bypass Active check
- Verify
Enable_File_Upload__c = trueon the Form__c record - Check Guest User has Read access to
Enable_File_Upload__cfield
- Check Error_Log__c for error details
- Verify Guest User has Create access to Case, ContentVersion, ContentDocumentLink
- Enable debug logs for the Guest User
- Assign the Web_to_Case_Admin permission set to your user
- Verify Form_Manager tab is set to Visible in the permission set
- Verify
Enable_Captcha__c = trueon the Form__c record - Check that
reCAPTCHA_Settings__chas a valid Site Key - Guest User needs Read access to
Enable_Captcha__cfield
- Verify Secret Key is correct in
reCAPTCHA_Settings__c - Check Remote Site Setting
Google_reCAPTCHAis active - Review Error_Log__c for detailed error messages
- Fixed: Users can now change reCAPTCHA type (v2 Checkbox, v2 Invisible, v3 Score) without re-entering the secret key
- Previously, the Setup Wizard required both Site Key and Secret Key to save any changes
- Now, when reCAPTCHA is already configured, users can change just the type and click Save
- Backend already supported partial updates (null values preserve existing) - this fix updates frontend validation to match
- First-time setup still requires both keys (unchanged behavior)
- Image compression: Images up to 25MB are automatically compressed to ~0.7MB before upload
- Uses browser-image-compression library for client-side compression
- Converts HEIC/PNG/WebP/BMP to JPEG for optimal size
- Shows "Optimizing..." progress during compression
- Compression target (0.7MB) ensures single-request upload without chunking
- Fixed file limits: Removed user-configurable "Max File Size" setting
- Images: Up to 25MB (auto-compressed)
- Documents (PDF, Word, etc.): Up to 2MB
- Videos: Not supported (users prompted to email separately)
- Simplified UX: "Enable File Upload" checkbox now shows help text with limits
- "Images: up to 25MB (auto-compressed) | Documents: up to 2MB"
- New static resource:
imageCompression.js- browser-image-compression library (v2.0.2) - Removed: "Max Document Size (MB)" input field from Form Manager
- Fixed: Files larger than ~1.5MB could not be uploaded due to Salesforce Visualforce Remoting payload limits
- Solution: Implemented chunked file uploads for large files
- Files ≤750KB: Uploaded in single request (as before)
- Files >750KB: Automatically split into 750KB chunks and uploaded sequentially
- Chunks are stored temporarily as ContentVersions, then assembled into final file
- Chunk files are automatically cleaned up after assembly
- New Apex methods:
uploadFileChunk(caseId, fileName, chunkData, chunkIndex, totalChunks, uploadKey)- Handles chunk uploadsgetChunkSize()- Returns chunk size for JavaScript reference
- Updated JavaScript: Added chunking logic, progress indicator during multi-chunk uploads
- Test coverage: 6 new unit tests for chunked upload scenarios
- Note: The
Max_File_Size_MB__csetting now actually works for files up to the configured limit (previously limited to ~2MB)
- Site dropdown added to Form Detail editor (new/edit form views)
- Select per-form Site override or use org-wide default
- Sites loaded from active Salesforce Sites in the org
- Public URL display with copy button in Form Detail view
- Shows computed public URL based on selected Site
- Warning message when no default Site is configured
- "Copy URL" row action added to Form Manager list view
- Copies public form URL to clipboard with one click
- Toast feedback on success/failure
- Default Site configuration saved during Setup Wizard (Step 2 → Step 3)
- Stores both Site ID and resolved base URL in
reCAPTCHA_Settings__c
- Stores both Site ID and resolved base URL in
- "View Live" action now uses correct public Site URL (not internal Salesforce URL)
- New custom fields:
reCAPTCHA_Settings__c.Default_Site_Id__c- Default Site ID for orgreCAPTCHA_Settings__c.Default_Site_Base_Url__c- Cached base URLForm__c.Site_Id__c- Per-form Site override
- URL encoding for form names with special characters
- 143 Apex tests passing
- Setup Wizard Complete step: Consolidated from 4 boxes to 2 boxes for cleaner UX
- Box 1: "Test Your Setup" - combines Sample Form, Test Form, and Public URL sections
- Box 2: "What's Next" - links to Form Manager
- Test Form section now only appears after sample form is created (prevents confusing "Form Not Available" errors)
- Sample Form marked as "(Optional)" for clarity
- Form Manager: Added "Created" date column (shows when each form was created)
- Form Manager: Added column sorting - click any column header to sort ascending/descending
- Form Editor: Fixed dropdown overflow issue where "Maps to Case Field" dropdown was cut off at bottom of screen
- Bug fix: Fixed "SObject row was retrieved via SOQL without querying the requested field: Form__c.CreatedDate" error
- Fixed: Replaced custom CSS chevron path with standard
lightning-progress-indicatorcomponent - Eliminates persistent white gap issues between chevron steps
- Native Salesforce component handles complete/current/incomplete styling automatically
- Simplified codebase: removed ~245 lines of custom CSS and ~50 lines of JS
- Click navigation on steps still works via
data-stepattribute
- reCAPTCHA v3 Score-based support added alongside v2 Checkbox and v2 Invisible
- reCAPTCHA Type selector in Setup Wizard with clear descriptions for each type
- Simplified Score Threshold UX - removed confusing technical input, uses sensible default (0.3)
- Admins can still adjust threshold via Setup → Custom Metadata Types if needed
- Updated
reCAPTCHA_Settings__cwithCaptcha_Type__candScore_Threshold__cfields - Server-side v3 score verification with configurable threshold
- Client-side v3 integration with invisible badge
- Added Step 5: reCAPTCHA to Setup Wizard (wizard now has 6 steps)
- Admin-friendly UI for configuring reCAPTCHA API keys without Anonymous Apex
- Partial updates supported (update Site Key or Secret Key independently)
- Input validation (max 255 chars, whitespace trimming)
- "Skip for Now" option for users who don't need CAPTCHA
- Warning on Complete step if reCAPTCHA was skipped
- 11 new unit tests for reCAPTCHA settings (41 total in SetupWizardControllerTest)
- 114 total tests passing across all controllers
- Google reCAPTCHA v2 "I'm not a robot" checkbox integration
- Per-form CAPTCHA toggle (
Enable_Captcha__cfield) reCAPTCHA_Settings__cprotected Custom Setting for API keys- Server-side token verification via Google API
- Client-side CAPTCHA widget with error handling
- Admin UI "Enable CAPTCHA" toggle in Form Manager
- Remote Site Setting for Google API callouts
- 9 new unit tests for CAPTCHA scenarios (22 total in CaseFormControllerTest)
- 88% code coverage on CaseFormController
- 5-step post-install setup wizard (now 6 steps with reCAPTCHA config)
- Automatic Guest User permission configuration
- Site detection and selection
- Manual configuration instructions (Enhanced + Classic Profile UI)
- Configuration validation
- Sample form creation
- Dynamic public URL generation
- "Web-to-Case Forms" Lightning App in App Launcher
- SetupWizardController with unit tests
- Setup_Wizard Lightning tab
- LWC Form Manager for creating/editing forms without Setup
- FormAdminController with CRUD operations (33 tests, 94%+ coverage)
- formAdminApp component with list view and delete modal
- formDetail component with inline field editing
- Clickable form names for quick editing
- Field reordering with up/down arrows
- URL hash routing for bookmarkable links
- Preview mode support (
?preview=true) - Form_Manager Lightning tab
- Initial release
- Form__c, Form_Field__c, Error_Log__c custom objects
- CaseFormController with file attachment support
- CaseFormPage Visualforce page
- Basic styling and client-side validation
- Error logging utility
See the 🧪 MANUAL TESTING REQUIRED section at the top of this README for the current testing checklist.
Status: Phases 0-3 complete and polished. Ready for Phase 4.
Recent changes (v0.4.8):
- reCAPTCHA type can now be changed without re-entering secret key (when already configured)
- Frontend validation updated to match backend's partial update support
File size limits (fixed):
| File Type | Limit | Behavior |
|---|---|---|
| Images (JPEG, PNG, HEIC, WebP, BMP) | 25MB | Auto-compressed to ~0.7MB |
| Documents (PDF, Word, etc.) | 2MB | Hard limit |
| Videos | N/A | Not supported |
Key architecture notes:
- Forms are org-wide (not tied to specific Sites)
- Sites are just public entry points - any configured Site can serve any form
- Users can run the Setup Wizard multiple times for different Sites
- Image compression happens client-side using browser-image-compression library
Dev org: [email protected] (alias: devorg)
GitHub: https://github.com/tilman-d/salesforce-webtocase
Quick start for next session:
cd /root/caseformpage
sf org login web --alias devorg # if needed
sf project deploy start --target-org devorgEmbeddable JavaScript Widget:
- Generate embeddable
<script>tag for external websites - Cross-domain form submission via postMessage or CORS
- Customizable styling via CSS variables
Multi-file Upload:
- Allow multiple file attachments per submission
- Drag-and-drop file upload UI
- File type and size validation per file
Custom Field Types:
- Picklist fields with configurable options
- Date picker fields
- Checkbox fields
- Phone number formatting
Form Analytics:
- Track form views, submissions, abandonment
- Success/error rate metrics
- Time-to-submit analytics
When creating the managed/unlocked package for AppExchange, include the following metadata components:
| Component | API Name | Description |
|---|---|---|
| Custom Object | Form__c |
Form configuration |
| Custom Object | Form_Field__c |
Form field definitions |
| Custom Object | Error_Log__c |
Error logging |
| Component | API Name | Description |
|---|---|---|
| Custom Setting (Hierarchy) | reCAPTCHA_Settings__c |
reCAPTCHA API keys and settings (Protected) |
| Field | API Name |
|---|---|
| Form Name | Form_Name__c |
| Title | Title__c |
| Description | Description__c |
| Success Message | Success_Message__c |
| Active | Active__c |
| Enable File Upload | Enable_File_Upload__c |
| Max File Size MB | Max_File_Size_MB__c |
| Enable Captcha | Enable_Captcha__c |
| Site Id | Site_Id__c |
| Field | API Name |
|---|---|
| Form (Master-Detail) | Form__c |
| Field Label | Field_Label__c |
| Field Type | Field_Type__c |
| Case Field | Case_Field__c |
| Required | Required__c |
| Sort Order | Sort_Order__c |
| Field | API Name |
|---|---|
| Error Message | Error_Message__c |
| Stack Trace | Stack_Trace__c |
| Form Id | Form_Id__c |
| Timestamp | Timestamp__c |
| Field | API Name |
|---|---|
| Site Key | Site_Key__c |
| Secret Key | Secret_Key__c |
| Captcha Type | Captcha_Type__c |
| Score Threshold | Score_Threshold__c |
| Default Site Id | Default_Site_Id__c |
| Default Site Base Url | Default_Site_Base_Url__c |
| Class | Description |
|---|---|
CaseFormController |
Public form controller |
CaseFormControllerTest |
Test class |
ErrorLogger |
Error logging utility |
ErrorLoggerTest |
Test class |
FormAdminController |
Form Manager admin controller |
FormAdminControllerTest |
Test class |
SetupWizardController |
Setup Wizard controller |
SetupWizardControllerTest |
Test class |
| Component | Description |
|---|---|
formAdminApp |
Form Manager main container |
formDetail |
Form editor with field management |
setupWizard |
Post-install setup wizard |
| Page | Description |
|---|---|
CaseFormPage |
Public form page |
| Resource | Description |
|---|---|
caseFormStyles |
Form CSS styling |
caseFormScript |
Form JavaScript (validation, compression, submission) |
imageCompression |
browser-image-compression library for client-side image optimization |
| App | API Name |
|---|---|
| Web-to-Case Forms | Web_to_Case_Forms |
| Page | API Name |
|---|---|
| Form Manager | Form_Manager |
| Setup Wizard | Setup_Wizard |
| Tab | API Name |
|---|---|
| Form Manager | Form_Manager |
| Setup Wizard | Setup_Wizard |
| Permission Set | API Name |
|---|---|
| Web-to-Case Admin | Web_to_Case_Admin |
| Remote Site | URL | Description |
|---|---|---|
| Google_reCAPTCHA | https://www.google.com |
reCAPTCHA verification API |
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>Form__c</members>
<members>Form_Field__c</members>
<members>Error_Log__c</members>
<name>CustomObject</name>
</types>
<types>
<members>reCAPTCHA_Settings__c</members>
<name>CustomObject</name>
</types>
<types>
<members>CaseFormController</members>
<members>CaseFormControllerTest</members>
<members>ErrorLogger</members>
<members>ErrorLoggerTest</members>
<members>FormAdminController</members>
<members>FormAdminControllerTest</members>
<members>SetupWizardController</members>
<members>SetupWizardControllerTest</members>
<name>ApexClass</name>
</types>
<types>
<members>formAdminApp</members>
<members>formDetail</members>
<members>setupWizard</members>
<name>LightningComponentBundle</name>
</types>
<types>
<members>CaseFormPage</members>
<name>ApexPage</name>
</types>
<types>
<members>caseFormStyles</members>
<members>caseFormScript</members>
<members>imageCompression</members>
<name>StaticResource</name>
</types>
<types>
<members>Web_to_Case_Forms</members>
<name>CustomApplication</name>
</types>
<types>
<members>Form_Manager</members>
<members>Setup_Wizard</members>
<name>FlexiPage</name>
</types>
<types>
<members>Form_Manager</members>
<members>Setup_Wizard</members>
<name>CustomTab</name>
</types>
<types>
<members>Web_to_Case_Admin</members>
<name>PermissionSet</name>
</types>
<types>
<members>Google_reCAPTCHA</members>
<name>RemoteSiteSetting</name>
</types>
<version>59.0</version>
</Package>-
Custom Setting:
reCAPTCHA_Settings__cis a Protected Hierarchy Custom Setting. The records themselves (API keys) are NOT included - users configure these post-install via Setup Wizard. -
Remote Site Setting: Include
Google_reCAPTCHAfor reCAPTCHA verification callouts. -
Permission Set:
Web_to_Case_Admingrants access to all admin functionality. Assign to users who need to manage forms. -
Post-Install Configuration Required:
- Create/select a Salesforce Site
- Configure Guest User permissions (via Setup Wizard)
- Add reCAPTCHA API keys (via Setup Wizard)
- Grant Apex class and VF page access to Guest User profile
-
Test Coverage: All Apex classes have >75% code coverage with dedicated test classes.