Two Save Buttons

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
User avatar
jennifer.eckard
Posts: 11
Joined: Fri Aug 11, 2017

31 Aug 2017

I have my form redirecting to the front page this is ideal for the majority of users however for the IT folks I would like a separate Cancel and Save button that returns to the list that shows on the Support tab, but I am not sure how to do this.

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

31 Aug 2017

Hello, Jennifer!
Here you can read about designing different forms for different user groups in SP Online - https://spform.com/groups-and-form-sets ... int-online

Once you add second Form set for IT specialists, add this code to JavaScript editor in Forms Designer:

Code: Select all

fd.cancel().click(function(){ 
	STSNavigate('/sites/yoursite/Lists/YourList/AllItems.aspx');
	return false; 
});

fd.onsubmit(function() {
	STSNavigate('/sites/yoursite/Lists/YourList/AllItems.aspx');
	return true;
});
Cheers

User avatar
jennifer.eckard
Posts: 11
Joined: Fri Aug 11, 2017

31 Aug 2017

I attempt to follow those directions and when I load the script the page starts to jump and I can not even save the changes.

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

31 Aug 2017

Are you using SharePoint Online or SharePoint 2013/16? This article is primarily for SP Online users.

First, design the Forms for different groups and make them work. You can add Plain/Rich Text control with the name of the Form, so you can see difference between them when you open them in the browser. Once both forms are complete and work, add these blocks one by one to the IT group Form and test it after adding each part:

Code: Select all

fd.onsubmit(function() {
	STSNavigate('/sites/yoursite/Lists/YourList/AllItems.aspx');
	return true;
});

Code: Select all

fd.cancel().click(function(){ 
	STSNavigate('/sites/yoursite/Lists/YourList/AllItems.aspx');
	return false; 
});
If you still experience trouble - let us know! Plus screenshots of the browser's console or some other visual representations of the errors might be very useful. Maybe tell us after what steps exactly did the errors appear, etc. We'll simply need more information to help.
Cheers

User avatar
jennifer.eckard
Posts: 11
Joined: Fri Aug 11, 2017

31 Aug 2017

I am using O365 and I was using the second redirect option I was just trying to add the redirect script and when I do that the page continues redirect and redirect

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

31 Aug 2017

Can you post here the code you were adding for redirection?
Cheers

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 7 guests