How do you use the backToPrevForm()

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
MES5464
Posts: 94
Joined: Mon Aug 26, 2013

28 Oct 2013

How do you use the backToPrevForm() in the save/submit and the cancel button?

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

30 Oct 2013

Hello,

If you wish to redirect users to another form after they submit the current one, please, follow instructions from our article:
http://spform.com/forms-designer- ... submission

To redirect users to the previously opened form when they click 'Cancel' button, use the following code:

Code: Select all

var cancel = fd.cancel().get(0);
cancel.onclick = function() {
  backToPrevForm();
  return false;
}

MES5464
Posts: 94
Joined: Mon Aug 26, 2013

30 Oct 2013

Do you have to open a form with fd.openForm() for fd.backToPrevForm() to work?

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

01 Nov 2013

To redirect users to the specific form, please, use fd.openForm(). If you wish to return users to the previously opened form, you have to use fd.backToPrevForm(). This function works only if the current form has been opened with fd.openForm(). Please, read our article to get more information:
http://spform.com/forms-designer- ... rint-forms

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 29 guests