Getting Started with Edge Delivery Services for AEM Forms using Universal Editor
Edge Delivery Services for AEM Forms combines high-performance web delivery with WYSIWYG authoring in Universal Editor. This guide covers creating, customizing, and publishing fast-loading forms.
What You鈥檒l Accomplish
By the end of this tutorial, you will:
- Set up a GitHub repository with the Adaptive Forms Block
- Create an AEM Site integrated with Edge Delivery Services
- Build and publish forms using Universal Editor
- Configure local development environment
Choose Your Path
Select the approach that matches your scenario:
Figure: Visual guide to help you choose the right implementation path
Prerequisites
To ensure a smooth and successful experience with Edge Delivery Services for AEM Forms using Universal Editor, review and confirm the following prerequisites before proceeding:
Access Requirements
- GitHub Account: You must have a GitHub account with permissions to create new repositories. This is essential for managing your project source code and collaborating with your team.
- AEM as a Cloud Service Authoring Access: Ensure you have author-level access to your AEM as a Cloud Service environment. This access is required to create, edit, and publish forms.
Technical Requirements
- Familiarity with Git: You should be comfortable performing basic Git operations such as cloning repositories, committing changes, and pushing updates. These skills are fundamental for source control and project collaboration.
- Understanding of Web Technologies: A working knowledge of HTML, CSS, and JavaScript is recommended. These technologies form the foundation of form customization and troubleshooting.
- Node.js (version 16 or higher): Node.js is required for local development and running build tools. Ensure you have version 16 or later installed on your system.
- Package Manager (npm or yarn): You will need either npm (Node Package Manager) or yarn to manage project dependencies and scripts.
Recommended Background
- AEM Sites Concepts: A basic understanding of AEM Sites, including site structure and content authoring, will help you navigate and integrate forms effectively.
- Form Design Principles: Familiarity with best practices in form design鈥攕uch as usability, accessibility, and data validation鈥攚ill enable you to create effective and user-friendly forms.
- Experience with WYSIWYG Editors: Prior experience using What You See Is What You Get (WYSIWYG) editors will help you leverage the Universal Editor鈥檚 visual authoring capabilities more efficiently.
Path A: Create a New Project with Forms
Recommended for: New projects, pilots, or proof-of-concept initiatives
Leverage the AEM Forms Boilerplate to accelerate your project setup. This boilerplate offers a ready-to-use template that seamlessly integrates the Adaptive Forms Block, enabling you to quickly build and deploy forms within your AEM Site.
Overview
To successfully launch your new project with integrated forms, you will:
- Create a GitHub repository using the AEM Forms Boilerplate template.
- Set up AEM Code Sync to automate content synchronization between AEM and your repository.
- Configure the connection between your GitHub project and your AEM environment.
- Establish and publish a new AEM Site.
- Add and manage forms using the Universal Editor.
The following sections will guide you through each step in detail, ensuring a smooth and efficient project setup experience.
-
Access the AEM Forms Boilerplate template
- Go to
Figure: AEM Forms Boilerplate repository with pre-configured Adaptive Forms Block -
Create your repository
- Click Use this template > Create a new repository
Figure: Using the template to create a new repository -
Configure repository settings
- Owner: Select your GitHub account or organization
- Repository name: Choose a descriptive name (e.g.,
my-forms-project
) - Visibility: Select Public (recommended for Edge Delivery Services)
- Click Create Repository
Figure: Configuring your new repository with public visibility
Validation: Confirm you have a new GitHub repository based on the AEM Forms Boilerplate template.
AEM Code Sync automatically synchronizes content changes between your AEM authoring environment and your GitHub repository.
-
Install the GitHub App
- Go to
-
Configure access permissions
- Select Only select repositories
- Choose your newly created repository
- Click Save
Figure: Installing AEM Code Sync with repository-specific permissions
Checkpoint: AEM Code Sync is now installed and has access to your repository.
The fstab.yaml
file connects your GitHub repository to AEM authoring environment for content synchronization.
-
Navigate to your repository
- Go to your newly created GitHub repository
- You should see the AEM Forms Boilerplate files
-
Create the fstab.yaml file
- Click Add file > Create new file in the root directory
- Name the file
fstab.yaml
Figure: Creating the fstab.yaml configuration file -
Add your AEM connection details
Copy and paste the following configuration, replacing the placeholders:
code language-yaml mountpoints: /: https://<aem-author>/bin/franklin.delivery/<owner>/<repository>/main
Replace:
<aem-author>
: Your AEM as a Cloud Service author URL (e.g.,author-p12345-e67890.adobeaemcloud.com
)<owner>
: Your GitHub username or organization<repository>
: Your repository name
Example:
code language-yaml mountpoints: /: https://author-p12345-e67890.adobeaemcloud.com/bin/franklin.delivery/mycompany/my-forms-project/main
Figure: Configuring the mountpoint for AEM integration -
Commit the configuration
- Add a commit message: 鈥淎dd AEM integration configuration鈥
- Click Commit new file
Figure: Committing the fstab.yaml configuration
Validation: Confirm your GitHub repository connection to AEM.
code language-none |
---|
|
-
Access the AEM Sites console
- Log into your AEM as a Cloud Service authoring instance
- Navigate to Sites
Figure: Accessing the AEM Sites console -
Start site creation
- Click Create > Site from template
Figure: Creating a new site from template -
Select the Edge Delivery Services template
- Choose the Edge Delivery Services Site template
- Click Next
Figure: Selecting the Edge Delivery Services site templatenote note NOTE Template not available? If you don鈥檛 see the Edge Delivery Services template: - Click Import to upload the template
- Download templates from
-
Configure your site
Enter the following information:
table 0-row-3 1-row-3 2-row-3 3-row-3 Field Value Example Site Title Descriptive name for site 鈥淢y Forms Project鈥 Site Name URL-friendly name 鈥渕测-蹿辞谤尘蝉-辫谤辞箩别肠迟鈥 GitHub URL Your repository URL https://github.com/mycompany/my-forms-project
Figure: Configuring your new AEM site with GitHub integration -
Complete site creation
- Review your settings
- Click Create
Figure: Confirming site creationSuccess! Your AEM site is now created and connected to GitHub.
-
Open in Universal Editor
- In the Sites console, locate your new site
- Select the
index
page - Click Edit
Figure: Opening your site for editingThe Universal Editor opens in a new tab, providing WYSIWYG authoring capabilities.
Figure: Your site opened in Universal Editor for WYSIWYG editing
Validation: Confirm your AEM site is ready for form authoring.
Publishing makes your site available on Edge Delivery Services for global access.
-
Quick publish from Sites console
- Return to the AEM Sites console
- Select your site pages (or select all with Ctrl+A)
- Click Quick Publish
Figure: Selecting pages for quick publish -
Confirm publishing
- In the confirmation dialog, click Publish
Figure: Confirming the publish actionAlternative: You can also publish directly from Universal Editor using the publish button.
Figure: Publishing directly from Universal Editor -
Access your live site
Your site is now live at:
code language-none https://<branch>--<repo>--<owner>.aem.page/content/<site-name>/
URL Structure Explained:
<branch>
: GitHub branch (usuallymain
)<repo>
: Your repository name<owner>
: Your GitHub username or organization<site-name>
: Your AEM site name
Example:
code language-none https://main--my-forms-project--mycompany.aem.page/content/my-forms-project/
Validation: Confirm your site is live on Edge Delivery Services.
note tip |
---|
TIP |
URL Patterns: |
|
Next: Create your first form
Path B: Add Forms to Existing Project
Best for: Existing AEM Sites with Edge Delivery Services
If you already have an AEM project using Edge Delivery Services, you can add form capabilities by integrating the Adaptive Forms Block.
Prerequisites for Path B
To proceed with integrating forms into your existing AEM project, ensure the following prerequisites are met:
- You have an existing AEM project that was created using the .
- You have a local development environment set up
- You possess Git access to your project repository, allowing you to clone, modify, and push changes as needed.
The following guide provides a structured approach to adding form capabilities to your existing project. Each step is designed to ensure a seamless integration and optimal functionality within the Universal Editor environment.
Overview
You will complete the following high-level steps:
- Copy the Adaptive Forms Block files into your project.
- Update your project鈥檚 configuration to recognize and support form components.
- Adjust ESLint rules to accommodate the new files and coding patterns.
- Build your project and commit the changes to your repository.
-
Navigate to your local project
code language-bash cd /path/to/your/aem-project
-
Download required files from AEM Forms Boilerplate
Copy these files from the :
table 0-row-3 1-row-3 2-row-3 3-row-3 Source Destination Purpose blocks/form/
Core form functionality scripts/form-editor-support.js
Universal Editor integration scripts/form-editor-support.css
Editor styling -
Update editor support
- Replace your
/scripts/editor-support.js
file with the
- Replace your
Validation: Confirm form block files are in your project.
-
Update section model
Open
/models/_section.json
and add form components to the filters:code language-json { "filters": [ { "id": "section", "components": [ "text", "image", "button", "form", "embed-adaptive-form" ] } ] }
What this does: Enables form components in the Universal Editor component picker.
Validation: Confirm form components appear in Universal Editor.
Why this step: Prevents linting errors from form-specific files and configures proper validation rules.
-
Update .eslintignore
Add these lines to
/.eslintignore
:code language-bash # Form block rule engine files blocks/form/rules/formula/* blocks/form/rules/model/* blocks/form/rules/functions.js scripts/editor-support.js scripts/editor-support-rte.js
-
Update .eslintrc.js
Add these rules to the
rules
object in/.eslintrc.js
:code language-javascript { "rules": { // Existing rules... // Form component cell limits 'xwalk/max-cells': ['error', { '*': 4, // default limit form: 15, wizard: 12, 'form-button': 7, 'checkbox-group': 20, checkbox: 19, 'date-input': 21, 'drop-down': 19, email: 22, 'file-input': 20, 'form-fragment': 15, 'form-image': 7, 'multiline-input': 23, 'number-input': 22, panel: 17, 'radio-group': 20, 'form-reset-button': 7, 'form-submit-button': 7, 'telephone-input': 20, 'text-input': 23, accordion: 14, modal: 11, rating: 18, password: 20, tnc: 12 }], // Disable this rule for forms 'xwalk/no-orphan-collapsible-fields': 'off' } }
Validation: Confirm ESLint works with form components.
-
Install dependencies and build
code language-bash # Install any new dependencies npm install # Build component definitions npm run build:json
What this does:
- Updates
component-definition.json
with form components - Generates
component-models.json
with form models - Creates
component-filters.json
with filtering rules
- Updates
-
Verify generated files
Check that these files in your project root contain form-related objects:
component-definition.json
component-models.json
component-filters.json
-
Commit and push changes
code language-bash git add . git commit -m "Add Adaptive Forms Block integration" git push origin main
Validation: Confirm your project includes form capabilities.
Next: Create Your First Form
Create Your First Form
Who should follow this section:
This section is relevant for users following either Path A (new project) or Path B (existing project).
With your project now equipped for form creation, you are ready to build your first form using the Universal Editor鈥檚 intuitive WYSIWYG authoring environment. The following steps provide a structured approach to designing, configuring, and publishing a form within your AEM Site.
Overview
The process of creating a form in Universal Editor consists of several key stages:
-
Insert the Adaptive Form Block
Begin by adding the Adaptive Form Block to your chosen page. -
Add Form Components
Populate your form by inserting components such as text fields, buttons, and other input elements. -
Configure Component Properties
Adjust the settings and properties of each component to meet your form鈥檚 requirements. -
Preview and Test Your Form
Use the preview functionality to validate the appearance and behavior of your form before publishing. -
Publish the Updated Page
Once satisfied, publish your page to make the form available to end users.
The following sections will guide you through each of these steps in detail, ensuring a smooth and effective form creation experience.
-
Open your page in Universal Editor
- Navigate to the Sites console in AEM
- Select the page where you want to add a form (e.g.,
index
) - Click Edit
Your page opens in Universal Editor for WYSIWYG editing.
-
Add the Adaptive Form component
- Open the Content Tree panel (left sidebar)
- Navigate to a section where you want to add your form
- Click the Add (+) icon
- Select Adaptive Form from the component list
Figure: Adding an Adaptive Form block to your page
Validation: Confirm you have an empty form container.
-
Navigate to your form block
- In the Content Tree, locate your newly added Adaptive Form section
Figure: Adaptive Form block in the content tree -
Add form components
You can add components in two ways:
Method A: Click to Add
- Click the Add (+) icon in your form section
- Select components from the Adaptive Form Components list
Method B: Drag and Drop
- Drag components directly from the component panel to your form
Figure: Adding components to your formRecommended starter components:
- Text Input (for name, email)
- Text Area (for messages)
- Submit Button
-
Configure component properties
-
Select any form component
-
Use the Properties panel (right sidebar) to configure:
- Labels and placeholders
- Validation rules
- Required field settings
Figure: Configuring component properties -
-
Preview your form
Your form will look something like this:
Figure: Example form created with Universal Editor
Validation: Confirm your form is ready for publishing.
note important |
---|
IMPORTANT |
Remember to publish your page after making changes to see updates in the browser. |
-
Publish from Universal Editor
- Click the Publish button in Universal Editor
Figure: Publishing your form from Universal Editor -
Confirm publishing
- In the confirmation dialog, click Publish
Figure: Confirming the publish actionYou鈥檒l see a success message confirming publication.
Figure: Successful publication confirmation -
View your live form
Your form is now live at:
code language-none https://<branch>--<repo>--<owner>.aem.page/content/<site-name>/
Example URL:
code language-none https://main--my-forms-project--mycompany.aem.page/content/my-forms-project/
Figure: Your published form page on Edge Delivery Services
Congratulations! Your form is now live and ready to collect submissions.
Next Steps
Now that you have a working form, you can:
- Customize styling by editing CSS and JavaScript files
- Add advanced form features like validation rules and conditional logic
- Set up local development for faster iteration
- Create standalone forms for specific use cases
Set Up Local Development Environment
Best for: Developers who want to customize form styling and behavior
A local development environment allows you to make changes and see them instantly without going through the publish cycle.
-
Install AEM CLI
The AEM CLI simplifies local development tasks:
code language-bash npm install -g @adobe/aem-cli
-
Clone your repository
code language-bash git clone https://github.com/<owner>/<repo> cd <repo>
Replace
<owner>
and<repo>
with your actual GitHub details. -
Start the local development server
code language-bash aem up
This starts a local server with hot-reload capabilities.
-
Make customizations
- Edit files in the
blocks/form/
directory for form styling and behavior - Modify
form.css
for styling - Update
form.js
for behavior
See changes instantly in your browser at
http://localhost:3000
- Edit files in the
-
Deploy your changes
code language-bash git add . git commit -m "Custom form styling" git push origin main
Your changes will be available at:
- Preview:
https://<branch>--<repo>--<owner>.aem.page/content/<site-name>
- Production:
https://<branch>--<repo>--<owner>.aem.live/content/<site-name>
- Preview:
Troubleshooting
Common Issues and Solutions
Problem: Build failures or linting errors
Solution 1: Handle Linting Errors
If you encounter linting errors:
-
Open
package.json
in your project root -
Find the
lint
script:code language-json "scripts": { "lint": "npm run lint:js && npm run lint:css" }
-
Temporarily disable linting:
code language-json "scripts": { "lint": "echo 'skipping linting for now'" }
-
Commit and push the changes
Solution 2: Module Path Errors
If you see 鈥淯nable to resolve path to module 鈥/scripts/lib-franklin.js鈥欌:
-
Navigate to
blocks/form/form.js
-
Update the import statement:
code language-javascript // Change this: import { ... } from '/scripts/lib-franklin.js'; // To this: import { ... } from '/scripts/aem.js';
Problem: Form submissions not working
Solutions:
- Ensure you have a submit button component
- Check form action URL configuration
- Verify form validation rules
- Test in preview mode first
Problem: Styling issues
Solutions:
- Check CSS file paths in
blocks/form/
- Clear browser cache
- Verify CSS syntax
- Test in the local development environment
Problem: Form components not appearing in Universal Editor
Solutions:
- Verify AEM Code Sync is installed and running
- Check that
fstab.yaml
has the correct AEM author URL - Ensure your AEM instance has early access enabled
- Confirm
component-definition.json
includes form components
Problem: Changes not visible after publishing
Solutions:
- Wait for CDN cache refresh
- Check browser cache (try incognito/private mode)
- Verify the correct URL format is being used