Redirect to external URL after new form submit
Hi,
I'd like to redirect the site to another domain after submit, how do I do that?
The following code doesn't work.
I'd like to redirect the site to another domain after submit, how do I do that?
The following code doesn't work.
Code: Select all
fd.sourceFormParam('http://google.ca);
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear metrovan,
Unfortunately, it's not possible in just one step without passing the ID. Instead, you can create a new page on your site and redirect users to it, using the same code, just use URL relative to your domain:
Then, on this page, add Script Editor webpart with the following content, it will redirect you to Google:
Unfortunately, it's not possible in just one step without passing the ID. Instead, you can create a new page on your site and redirect users to it, using the same code, just use URL relative to your domain:
Code: Select all
fd.onsubmit(function() {
fd.sourceFormParam('/sites/site/subsite/SitePages/redirectToGoogle.aspx');
return true;
});
Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Redirecting...</title>
<meta http-equiv="REFRESH" content="0;url=http://www.google.ca">
</head>
<body>
</body>
</html>
Cheers
-
- Information
-
Who is online
Users browsing this forum: No registered users and 9 guests