Custom Merge Fields allow you to create flexible Themes that can be easily customized by your colleagues without requiring them to edit code.
Step 1: Understand Merge Fields in Themes
-
Merge Fields are placeholders that get replaced with actual content when a form is created
-
Standard merge fields include {{Title}}, {{Description}}, and {{FormContent}}
-
Custom merge fields allow for additional customization options
-
They're especially useful for images, text blocks, or other variable content
Step 2: Create a Theme with custom Merge Fields
-
Open Online Actions and navigate to Settings > Themes
-
Create a new Theme or edit an existing one
-
In your Theme HTML, add custom merge fields using double curly braces:
-
<div class="header">
-
<img src="{{HeaderImage}}" alt="{{HeaderAltText}}">
-
<h2>{{HeaderText}}</h2>
</div>
-
Save your Theme with these custom merge fields in place
Step 3: Define your custom Merge Fields
-
After saving your Theme, scroll down to the "Custom Merge Fields" section
-
Click "Add Custom Merge Field"
-
Enter the name of your merge field exactly as it appears in your code (e.g., "HeaderImage")
-
Select the appropriate field type:
-
Text - For single-line text
-
Text Area - For multi-line text
-
Image - For image uploads
-
Add a label and description to help form creators understand what to enter
-
Click "Save" to add the merge field
Step 4: Set default values (optional)
-
For each custom merge field, you can set a default value
-
This value will be used if the form creator doesn't specify something else
-
For images, upload a default image
-
For text, enter default text
-
This ensures your Theme always looks complete, even if not all fields are customized
Step 5: Use your Theme with custom Merge Fields
-
Create or edit an Online Actions form
-
On the Build Page step, select your Theme from the dropdown
-
You'll see input fields for all your custom merge fields
-
Enter the specific content for this form
-
Preview the form to see how your custom content appears in the Theme
