You are viewing limited content. For full access, please sign in.

Question

Question

How can I redirect to Web Client upon the user clicking an "Approve" button in Forms - NOT from the original submission form?

asked on May 16, 2017 Show version history

I am trying to redirect to the Web Client upon a secondary User Task approval. Basically, I need to launch a new window with Web Client and go to a static URL upon completion of a Form.

I can do something similar from the initial form submission, but not from a subsequent User Task.

Any thoughts on some appropriate javascript to make this possible? Important: the Form still needs to properly submit, *as well as* launch the Web Client to a particular address.

0 0

Replies

replied on May 16, 2017 Show version history

Give this a try. Change the "NAME_OF_YOUR_USER_TASK" part by the actual name of the task where you want the form to open the static URL.

$(document).ready(function(){

    $('.Submit, .Approve').click(function(){

var approvalStage = $('#ApprovalPane > div.col-xs-12.pane-header.ng-isolate-scope > div > div:nth-child(1) > div.lfm-toolbar > div.lf-vertical-center.ellipsis.lf-flex-flexible.lf-flex-container > div', window.parent.document).html(); 
     
  if (approvalStage == 'NAME_OF_YOUR_USER_TASK') {
    
    window.open('http://www.laserfiche.com', '_blank');
    $( "form" ).submit();
  }
 
	});

});

 

NAME_OF_YOUR_USER_TASK.png
0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.