Sitecore 9 Forms – The form was not loaded due to an error

So today I decided to try out Sitecore 9’s Forms engine for the first time.

I clicked on the Create button and then selected Blank Form

From there I was greeted with this error

The form was not loaded due to an error

Great. My first form isn’t going well.

So I opened up the main log and saw this error:

10616 17:08:37 ERROR Application error.
Exception: System.InvalidOperationException
Message: The partial view 'Form' was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/FormBuilder/Form.cshtml
~/Views/FormBuilder/Form.vbhtml
~/Views/Shared/Form.cshtml
~/Views/Shared/Form.vbhtml
~/views/renderers/Form.vbhtml
~/views/renderers/Form.cshtml
~/Views/FormBuilder/Form.aspx
~/Views/FormBuilder/Form.ascx
~/Views/Shared/Form.aspx
~/Views/Shared/Form.ascx
Source: System.Web.Mvc
   at System.Web.Mvc.PartialViewResult.FindView(ControllerContext context)
   at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
   at System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Ahah! I know what happened. A few weeks back I was cleaning up the project directory and inside the Views folder I got rid of the Examples and FormBuilder folders. I knew Examples wasn’t needed and I guess I didn’t really think through the other one before deleting it.

So I copied the folder over from another fresh install of Sitecore, went back into the Forms screen and tried creating another form…

Now that looks better!


Tags: ,

  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

Leave a Reply