November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Put the view into Views/Shared/ElementBlocks and add @using model_namespace then @model model_name
Thank you,
I did try it first, however VS was giving me red line under @model so I thought theres something wrong with it. Although It wont actually give any error, it will build and work as well.
I created a Model for custom form element
Then I created a view in modules\_protected\EPiServer.Forms\Views\ElementBlocks\GA4_CustomFormElement.cshtml
which contains a vue component with following code
I can see the element in CMS, I can add it and see it rendered so all good. Only thing now missing is how to I attach Model of <GA4_CustomFormElement> type to it ?
Other basic form elements are ascx files which inherit ViewUserControl. How do I add my custom block as Model to this?