Publish Adaptive Forms with Edge Delivery Services
Publishing an Adaptive Form makes it available on Edge Delivery Services for end users to access and submit. This process involves three main phases: publishing the form, configuring security settings, and accessing the live form.
What you鈥檒l accomplish:
- Publish your form to Edge Delivery Services
- Configure security settings for form submission
- Access and verify your published form
- Set up proper URL routing and CORS policies
Prerequisites
- Adaptive Form created using Edge Delivery Services template
- Form tested and ready for production use
- AEM Forms author permissions
- Cloud Manager access (for production configuration)
- Developer access to form block code (for submission setup)
Publishing Process Overview
Publishing forms to Edge Delivery Services follows a three-phase approach:
- Phase 1: Form Publication - Publish your form to the CDN and verify publication status
- Phase 2: Security Configuration - Set up CORS policies and referrer filters for secure submissions
- Phase 3: Access and Validation - Test form functionality and validate the complete workflow
Each phase builds on the previous one to ensure secure, functional deployment.
Phase 1: Publish Your Form
-
Access your form: Open your Adaptive Form in the Universal Editor
-
Start publishing: Click the Publish icon in the toolbar
-
Review publishing assets: The system shows all assets being published, including your form
-
Confirm publishing: Click Publish to proceed
-
Verify success: Look for the confirmation message
Check status: Click the Publish icon again to view current status
Validation Checkpoint:
- Form shows 鈥淧ublished鈥 status in the editor
- No error messages during publishing process
- Form appears in published assets list
To unpublish a form:
- Open your form in the editor
- Click the three-dot menu (鈰) in the upper-right corner
- Select Unpublish
Phase 2: Configure Security Settings
To enable secure form submissions, you must configure security settings that:
- Allow Edge Delivery Services to submit data to AEM
- Prevent unauthorized access to your AEM instance
- Enable CORS (Cross-Origin Resource Sharing) for form submissions
- Filter requests to only allow legitimate Edge Delivery domains
note important |
---|
IMPORTANT |
Required for Production: These configurations are mandatory for form submissions to work in production environments. |
Purpose: Direct form submissions to your AEM instance
File Location: blocks/form/constant.js
in your Edge Delivery Services project
Configuration Examples:
code language-javascript |
---|
|
Validation Checkpoint:
constant.js
file updated with correct AEM publish URL- URL matches your environment (production, staging, or local)
- No trailing slash in the URL
Purpose: Allow form submission requests from Edge Delivery Services domains
Implementation: Add CORS configuration to your AEM dispatcher or Apache configuration
code language-apache |
---|
|
Validation Checkpoint:
- CORS rules applied to dispatcher configuration
- All required domains (localhost, hlx.page, hlx.live) are included
- Configuration deployed to target environment
Reference Documentation:
Purpose: Restrict write operations to authorized Edge Delivery Services domains
Implementation Method: Configure via Cloud Manager in AEM as a Cloud Service
Configuration File: Add to your project鈥檚 OSGi configuration
code language-json |
---|
|
Configuration Breakdown:
allow.empty
: Rejects requests without referrer headersallow.hosts.regexp
: Permits requests from Edge Delivery Services domainsfilter.methods
: Applies filtering to these HTTP methodsexclude.agents.regexp
: User agents excluded from filtering
Validation Checkpoint:
- Referrer filter configuration deployed via Cloud Manager
- Configuration active on AEM publish instance
- Test form submission works from Edge Delivery Services domain
- Unauthorized domains are blocked from submitting forms
Reference Documentation:
Phase 3: Access Your Published Form
Standard URL Format:
code language-none |
---|
|
URL Components:
<branch>
: Git branch name (typicallymain
)<repo>
: Repository name<owner>
: GitHub organization or username<form_name>
: Your form鈥檚 name (lowercase, hyphenated)
Environment-Specific URLs:
code language-none |
---|
|
Verify Form Accessibility:
- Test form loading: Visit your form URL and confirm it loads properly
- Test form submission: Fill out and submit the form to verify data processing
- Check responsive design: Test form on different devices and screen sizes
- Validate security: Ensure CORS and referrer filter are working correctly
Expected Results:
- Form loads without errors
- All form fields render correctly
- Form submission processes successfully
- Data appears in configured destination (spreadsheet, email, etc.)
- No console errors related to CORS or security policies