Open /umbraco/plugins/umbracoContour/views/Form.cshtml
and look for the following line:
@Html.Partial(FormViewResolver.GetScriptView(Model.FormId), Model)
Replace it with these lines:
List<FormViewModel> temp = HttpContext.Current.Items["ContourScripts"] as List<FormViewModel>;
if (temp == null) {
HttpContext.Current.Items["ContourScripts"] = temp = new List<FormViewModel>();
}
temp.Add(Model);
Then at the bottom of your master view (or similar), you can add the following lines:
List<FormViewModel> scriptData = HttpContext.Current.Items["ContourScripts"] as List<FormViewModel>;
if (scriptData != null) {
foreach (FormViewModel model in scriptData) {
@Html.Partial(FormViewResolver.GetScriptView(model.FormId), model)
}
}
For the second part, I had to put it in my master page like this:
@{
List scriptData = HttpContext.Current.Items["ContourScripts"] as List;
if (scriptData != null)
{
<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.22/jquery-ui.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.10.0/jquery.validate.min.js" type="text/javascript"></script>
<script src="http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.validate.unobtrusive.min.js" type="text/javascript"></script>
foreach (FormViewModel model in scriptData)
{
@Html.Partial(FormViewResolver.GetScriptView(model.FormId), model)
}
}
}
Also, had to include these lines at the top of the master:
@using Umbraco.Forms.Core
@using Umbraco.Forms.Mvc.Models;
@using Umbraco.Forms.Mvc.BusinessLogic;