Overriding Custom Forms "Create" shape in Bootstrap theme

Topics: Customizing Orchard
Mar 2, 2014 at 10:34 PM
I'm using this Bootstrap Theme and Custom Forms. I need to override the Custom Forms shapes in order to add the correct class names required by Bootstrap 3 to the submit button.

The html I need to change is located in the \Modules\Orchard.CustomForms\Views\Item\Create.cshtml file. How do I override this file? What should the path be?

In this post BertrandLeRoy suggests it should be Views\Orchard.CustomForms\Item\Create.cshtml but that did not work for me.
Mar 3, 2014 at 7:25 AM
The path Bertrand suggested is correct. Views folder should be your theme's Views folder.

Mar 4, 2014 at 8:31 PM
The path does not work. Can anyone Get this to work?

Steps to reproduce
  1. Download and install a fresh orchard project
  2. Enable the Custom Forms module
  3. Create a Content Type name "Contact Form" with two inputs and a text field, "Name", "Email" and "Message"
  4. Add a new Custom Form widget to the content zone and select the Content Type of "Contact Form".
  5. Copy the \Modules\Orchard.CustomForms\Views\Item\Create.cshtml to \Themes\TheThemeMachine\Views\Orchard.CustomForms\Item\Create.cshtml
    Add a <h1> tag to the Create.cshtml file so I you can see if it's being rendered.
After doing this and viewing the home page the form is displayed without the additional tag.
Mar 5, 2014 at 7:17 AM
In case of a Custom Form *widget*, you need to override the custom form editor template wrapper, Parts.CustomForm.Wrapper.cshtml (in theme's Views folder root), I guess. The one Bertrand suggested works if you want to alternate a custom form item, not a widget.

Marked as answer by daviglenn on 3/23/2014 at 3:30 PM
Mar 23, 2014 at 10:29 PM
Overriding Parts.CustomForm.Wrapper.cshtml worked perfectly, thanks @kassobasi