Try our conversational search powered by Generative AI!

Custom Form Container - Adding DIV tag between the form elements label and the field



I have followed the below reference to create a form container, and am trying to customise the look of the form.

Based on the documentation for "Rendering a multi-column form container block" under CMS 11.5 Developer Guides - Forms,

I have created a html helper RenderFormElements, and am looking to add custom div tags between the label and fields of a form element.

I understand that html.RenderContentData(content, false); is the function which returns the html details. HTMLHelper for RenderContentData could be the solution, but I need the content present in RenderContentData function. How can I get the original code for this function to write a htmlhelper class? Or is there a better way to achieve the ask?

Jun 02, 2020 7:44

If you are rendering a Forms element, you just pass the Model to your helper function. The Model should be ContentData.

Jun 05, 2020 7:36
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.