Thanks again for your quick response before with my other query, hope you can help me again, I promises his will be the last time :-)
I am using the Plain Javascript template to render 2 forms on the same page, created 2 doc types pick, and pick2, but in both instances the same form renders in both on the page, again not sure were I am going wrong, the code with the page is as follows:
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@using formulate.app.Types
@using Terratype
@{
Layout = "_Root.cshtml";
// Get a view model for the picked form.
var pickedForm = Model.Content.GetPropertyValue<ConfiguredFormInfo>("pick");
var vm = formulate.api.Rendering.GetFormViewModel(pickedForm.FormId, pickedForm.LayoutId,
pickedForm.TemplateId, Model.Content);
var pickedForm2 = Model.Content.GetPropertyValue<ConfiguredFormInfo>("pick2");
var vm2 = formulate.api.Rendering.GetFormViewModel(pickedForm2.FormId, pickedForm2.LayoutId,
pickedForm2.TemplateId, Model.Content);
}
and further down the page 2 instances of the forms:
Not sure what's up with that. Maybe double check the properties to ensure they're picking the correct configured forms, then check each configured form to ensure they're picking the correct layout, then check each layout to ensure they're picking the correct forms.
Thanks for getting back in touch, I managed to get the above code working in the end, just reinstalled the plugin again, the code may of been cached on the server.
Multiple instances of Plain JavaScript Template
Hi Nick,
Thanks again for your quick response before with my other query, hope you can help me again, I promises his will be the last time :-) I am using the Plain Javascript template to render 2 forms on the same page, created 2 doc types pick, and pick2, but in both instances the same form renders in both on the page, again not sure were I am going wrong, the code with the page is as follows:
and further down the page 2 instances of the forms:
and also:
Any help would be much appreciated, thanks again.
Nick
Not sure what's up with that. Maybe double check the properties to ensure they're picking the correct configured forms, then check each configured form to ensure they're picking the correct layout, then check each layout to ensure they're picking the correct forms.
You ever get it working? If not, I can take a deeper look.
Hi Nick,
Thanks for getting back in touch, I managed to get the above code working in the end, just reinstalled the plugin again, the code may of been cached on the server.
Thanks again, great addition to Umbraco.
Cheers
Nick
is working on a reply...