0
votes

I have enabled the Custom Forms module and added a new Custom Forms widget with the content type set as a custom content type. All works fine, however, I want to override the HTML generated.

I can see that the \Modules\Orchard.CustomForms\Views\Items\Create.cshtml is responsible for rendering the form. But how do I override this file?

I have tried creating a custom \Themes\TheThemeMachine\Views\Orchard.CustomForms\Item\Create.cshtml view but that doesn't work.

1
I'm using Orchard 1.7.2 btwDavid Glenn
Are you trying to override the form template, or the field templates?justrhysism
@justrhysism the form template, specifically, the submit button of the form. I have overridden the fields using \EditorTemplates\Fields\Input.Edit.cshtmlDavid Glenn

1 Answers

1
votes

\Views\Orchard.CustomForms\Item\Create.cshtml is correct for overriding a custom form item.

However if you are using a widget to render the custom form, as in my case, then you need to override Parts.CustomForm.Wrapper.cshtml in the Views folder of your theme.

This post in the Orchard forums gave me the answer.