Can I save created forms into site template?

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

07 May 2015

Hi,

This is a known issue that has not been fixed since SharePoint 2010. To work it around, please, insert the following code into a display form with Forms Designer:

Code: Select all

//Fix Edit item link on a display form
ExecuteOrDelayUntilScriptLoaded(function () {
	var replacement = '$1' +
			(_spPageContextInfo.webServerRelativeUrl == '/' ? '' : _spPageContextInfo.webServerRelativeUrl) +
			'/_layouts/15/listform.aspx?PageType=6&ListId=' +
			_spPageContextInfo.pageListId +
			'&$3';

	// Fix ribbon
	try {
		var wpId = $('#fd_form').closest('div[webpartid]').attr('id');
		var cmd = SP.Ribbon.PageManager.get_instance().getPageComponentById(wpId)._controlData['Ribbon.ListForm.Display.Manage.EditItem'];
		if (cmd && cmd.ClickScript.indexOf("~list") > 0) {
			cmd.ClickScript = cmd.ClickScript.replace(/(javascript:STSNavigateWithCheckoutAlert\(')(.*\?)(.*)/, replacement);
		}
	} catch (e) { }
}, "sp.ribbon.js");

hp
Posts: 26
Joined: Thu Jan 15, 2015

08 May 2015

Thanks Dmitry! that workes perfectly.

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

07 Jul 2015

Good news for everyone! Now you can transfer forms within a site template even if they contain Related items controls or there are multiple groups of forms. Moreover, you can continue customizing forms on a target site right after creating:

http://spform.com/documentation/versions#3_0_1

Anita Weber
Posts: 9
Joined: Tue Nov 24, 2015

15 Dec 2015

Dimtry, can you please confirm the process. If I save a site as a template in SharePoint Online and there are lists in that current site with Form Designer instances configured, will they also save in the Site Template?

Likewise, if I create Dashboard Designer instances are they saved with the Site Template by chance?

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

16 Dec 2015

Hi Anita,

Yes, starting from Forms Designer 3.0.1 you can transfer forms within a site template. As for Dashboard Designer, you should test it: if a source list has the same URL in the new location then the chart will work.

Chrisack
Posts: 1
Joined: Fri Dec 02, 2016

02 Dec 2016

Hello, I am currently getting an error trying to create a site template using Forms Designer 3.1.2 for SharePoint Online. Is this issue resolved or does it require additional configuration? Here is the error:


Sorry, this site can't be saved as a template. It contains apps that don't work in templates: Forms Designer


Thanks for your help.

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

05 Dec 2016

Hi,

You cannot save a site containing apps as a template. First, you have to remove all apps. All the designed forms will continue working properly. Next, save the site as a template.

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 24 guests