I am opening the following partial via ajax. However the form isnt working just wondering what do I have to include to get it working or is there a better solution to get it working. None of the Js is working.
@inherits UmbracoViewPage<formViewModel>
@{
var form = new Guid(Model.FormId);
var theme = Model.formTheme;
var includeScripts = "0";
var recordGuid = Guid.Empty;
}
<div id="displayForm">
@if (form != null)
{
Html.RenderAction("RenderForm", "UmbracoForms", new { formId = form, recordId = recordGuid, theme = theme, includeScripts = includeScripts });
}
</div>
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.0.0.min.js"></script>
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.16.0/jquery.validate.min.js"></script>
<script src="https://ajax.aspnetcdn.com/ajax/mvc/5.2.3/jquery.validate.unobtrusive.min.js"></script>
Not had any experience with doing this via an Ajax request, but one pitfall that I did succumb to during a Forms and site upgrade was that inadvertently rendering two different versions (one in layout, one in a partial) of the JQuery scripts appear to break the Forms functionality. I assume this could also be the case even if the versions were identical but still being render multiple times... Hope this helps.
just for anyone else who comes across this couldnt get it to work, ended up building a seperate master template (which had no header and footer that just had the necessary Js and css) that called the render macros for the form and called that from the ajax to display in the fancybox, which worked.
Display umbraco form in fancybox
I am opening the following partial via ajax. However the form isnt working just wondering what do I have to include to get it working or is there a better solution to get it working. None of the Js is working.
Not had any experience with doing this via an Ajax request, but one pitfall that I did succumb to during a Forms and site upgrade was that inadvertently rendering two different versions (one in layout, one in a partial) of the JQuery scripts appear to break the Forms functionality. I assume this could also be the case even if the versions were identical but still being render multiple times... Hope this helps.
Unfortunately I dont think thats my issue even if I remove the cdn links the form doesnt work.
just for anyone else who comes across this couldnt get it to work, ended up building a seperate master template (which had no header and footer that just had the necessary Js and css) that called the render macros for the form and called that from the ajax to display in the fancybox, which worked.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.