Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

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

Vote:
 

Hi,

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?

#223662
Jun 02, 2020 7:44
Vote:
 

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

#223852
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.