0

I am working on the Optimizely CMS trying to create multi column layout form from Display Option but having issues with the Html helper where to define it in FormContainerBlock.cshtml

How can i call this helper from Optimizely CMS.

public static void RenderFormElements(this HtmlHelper html, int currentStepIndex, IEnumerable<IFormElement> elements)

3
  • You need to add additional details, but this doesn't seem Optimizely-specific. The HTML helper in a Razor view would simply be invoked using Html.RenderFormElements(...), just like in any ASP.NET app.
    – Ted Nyberg
    Commented Mar 18 at 10:21
  • @TedNyberg I am trying to call my method like this Optimizely_Project.Helpers.HtmlHelpers.RenderFormElements(step.i, step.value.Elements); My method is public static void RenderFormElements(this IHtmlHelper html, int currentStepIndex, IEnumerable<IFormElement> elements) {} it is asking for this IHtml helper method Commented Mar 18 at 10:56
  • You're not invoking it as an extension method and you're not passing the html argument.
    – Ted Nyberg
    Commented Mar 19 at 9:32

0