Page 1 of 1

Re-direct to form when using form sets...

Posted: 15 Sep 2017
by pselman
Hi,

We are using a number of different form sets and currently have a re-direction in java-script that works but with a slight delay.

We know that we can use a html field to do this with no delay and have tried using this code on the default edit form;

<script type="text/javascript">
<xsl:if test="@Action_x0020_Type='Electrical Assessment'">
fd.openform('fd_Task_ebbaca14-3a0b-577b-e5e2-5258a39e3ab9_EditForm.aspx');
</xsl:if>
</script>

This does not re-direct and just loads the default edit, which only have the field on

The only difference to having seen this work elsewhere is that this is a task list and Action Type is a lookup field

Thanks

Re: Re-direct to form when using form sets...

Posted: 15 Sep 2017
by Nikita Kurguzov
pselman wrote:
15 Sep 2017
<script type="text/javascript">
<xsl:if test="@Action_x0020_Type='Electrical Assessment'">
fd.openform('fd_Task_ebbaca14-3a0b-577b-e5e2-5258a39e3ab9_EditForm.aspx');
</xsl:if>
</script>
Right here, the main issue I see is the syntax, it's supposed to be:

Code: Select all

<script type="text/javascript">
	<xsl:if test="@Action_x0020_Type='Electrical Assessment'">
	fd.openForm('fd_Task_ebbaca14-3a0b-577b-e5e2-5258a39e3ab9_EditForm.aspx');
	</xsl:if>
</script>

Re: Re-direct to form when using form sets...

Posted: 15 Sep 2017
by pselman
Thanks Nikita...! Capital F!