Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

HomeDev GuideRecipesAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubNuGetDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Render metadata to form's HTML element

Describes the ability to render metadata to extend functionality of each form.

📘

Note

Optimizely Forms is only supported by MVC-based websites and HTML5-compliant browsers.

You can extend the functionality of each form. This feature:

  • Lets an editor set configuration values for a form as extra metadata. Access this field on a form container from All Properties view >  Settings tab.
  • Renders that metadata as a data-epiforms-metadata attribute on the root element of the <form> tag in edit view.
  • You can write code to modify the form based on the metadata. For example:
    • Change the layout of elements from vertical to horizontal. To do this, an editor inserts horizontalin the metadata.
    • Change the background color based on metadata.
751