Redirect from Edit- to Displayform depending on current data set
Depending on the current Status value i want to redirect from Editform to the Displayform.
Currently I´m using following JS in the Editform:
var statusindex = fd.field('VI_Status').control()._el().find('select')[0].selectedIndex;
if (!statusindex == 0) {
fd.openForm('/...._DisplayForm.aspx');
}
My Problem is that first the Editform is loading completely (it´s not very fast!) and then the Displayform is loaded!!
Is there a way to redirect acuratly before loading the Editform (like the functionality for redirecting user-groups) ?
I´m using SharePoint Online and only have "form set´s" aviailable which i already using here.
thx for helping me.
Currently I´m using following JS in the Editform:
var statusindex = fd.field('VI_Status').control()._el().find('select')[0].selectedIndex;
if (!statusindex == 0) {
fd.openForm('/...._DisplayForm.aspx');
}
My Problem is that first the Editform is loading completely (it´s not very fast!) and then the Displayform is loaded!!
Is there a way to redirect acuratly before loading the Editform (like the functionality for redirecting user-groups) ?
I´m using SharePoint Online and only have "form set´s" aviailable which i already using here.
thx for helping me.
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hi,
Put an HTML-control on top of your form, switch CDATA property to False and insert the following content:
Replace 'Status' with the internal name of your Status field and 'Value' with its value that causes the redirection.
Put an HTML-control on top of your form, switch CDATA property to False and insert the following content:
Code: Select all
<script type="text/javascript">
<xsl:if test="@Status='Value'">
fd.openForm('/');
</xsl:if>
</script>
-
- Information
-
Who is online
Users browsing this forum: No registered users and 1 guest