Tags: CMS12 Episerver Forms Optimizely/Episerver

Custom form element view in Optimizely CMS 12

Ever wondered how to add a custom view for an Optimizely Forms form element in Optimizely CMS 12? You could have a look at this 7 year old article, but it's a somewhat outdated.

Step 1 - get yourself a view

Step 2 - use your view

services.Configure<RazorViewEngineOptions>(o =>
{
      o.ViewLocationFormats.Add("~/Views/ElementBlocks/{0}" + RazorViewEngine.ViewExtension);
});

That's it!

Found this post helpful? Help keep this blog ad-free by buying me a coffee! ☕