cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Nintex Form in Site Template

Jump to solution

I'm trying to embedd a Nintex Form for a list into a site template which i save with "Save site as Template".

When i create a new subsite from this template, the Nintex Form exists for the list, but it is only shown if i edit the form and publish it, otherwise the default Sharepoint Display Form is shown.

Can anyone tell me how i can publish the Nintex Form after the site is created?

I'm creating the site with C# SSOM in an event receiver.

Thanks in advance

Labels: (2)
0 Kudos
Reply
2 Replies
Automation Master
Automation Master

Re: Nintex Form in Site Template

Jump to solution

Hi Bernhard,

did you have a look at this post: Is there a way to deploy a Nintex Form from a script (like powershell or feature) instead of a Expor... 

It explains how to publish a Nintex Form from code.

If you just need to change the form you can set the 'DefaultDisplayFormUrl', 'DefaultEditFormUrl' and 'DefaultNewFormUrl' properties of your SPList object but it sounds like the form needs to be published again.

Let us know if it works for you!

Cheers

Philipp

0 Kudos
Reply
Highlighted
Not applicable

Re: Nintex Form in Site Template

Jump to solution

Thank you for your fast answer! The following code works for me:

FakeSPContext(web);
var service = new NfWcfService();
FormInfo formInfo = service.GetForm("New Item", listId);
service.PublishForm("New Item", listId,formInfo.Form);

In my case the content type is "New Item" instead of an existing content type id.

0 Kudos
Reply