How can we redirect to another url after submit the infopath form - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

How can we redirect to another url after submit the infopath form

Last post 11-26-2014 08:50 PM by mb042. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 08-24-2014 09:01 AM

    How can we redirect to another url after submit the infopath form

    I am modifying the workflow task form in infopath 2013. In the "Complete Task" button I have written the below rules: 1. Sumbit data to sharepoint 2. Close the form. After clicking on the "Complete Task" button its redirecting to workflow task page again, I want to redirect to root site home page. How can I do this(possibly using rules)?
  • 09-18-2014 12:12 PM In reply to

    • RaYvA
    • Top 100 Contributor
    • Joined on 05-09-2013
    • Melbourne, Australia
    • Posts 86

    Re: How can we redirect to another url after submit the infopath form

     You do it from the initial link that you had your users press, there is a parameter called 'Source' that you append to the HTML link, that will direct your users back to wherever you want them to go....
    So you add '?Source=http://my.server/wherever/page.aspx' blah and then they will be redirected to that page when the user closes your form

  • 10-07-2014 08:21 AM In reply to

    Re: How can we redirect to another url after submit the infopath form

    This sounds easy enough to do, BUT where is this 'SOURCE' you speak of?  When I open my InfoPath form, the form opens.  I am brand new to this, so this is all very confusing to me and I have absolutely no help in my department to get me through this.  If you could provide step by step instructions or screen shots, it would be helpful.  Also, does this have to be done in SharePoint designer (which no one is specifying so am assuming every one thinks we know where to do this?)  Would really appreciate your help, thank you.

  • 11-26-2014 08:50 PM In reply to

    • mb042
    • Not Ranked
    • Joined on 11-26-2014
    • Posts 2

    Re: How can we redirect to another url after submit the infopath form

    Add an extra view to your form that has nothing but a text control that says 'Submitted'. Change your submit to switch to this view after submission. Publish. Using debug(F12) in IE find the control ID when it flicks to this view. Use a webpart page and add a Script Editor (2013) or Content Editor web part.

    This example redirects after 5 second to google.

    Insert the following (make sure jquery line points to a jquery.js you have in your library)

    <script src="/sites/xxx/SiteAssets/jquery-1.11.1.min.js" type="text/javascript" unselectable="on"></script>
    <script type="text/javascript" unselectable="on">
    function begin(){
       setTimeout(begin,500);
       var mess = $('#ctl00_ctl44_g_cd0171f3_bcce_456e_927d_9d4748ec0ed7_FormControl0_V1_I1').text();
       if (!mess) {mess="N";}
       if (mess.indexOf('Submitted') > -1){
           setTimeout(function() {document.location.href = "http://www.google.com"},5000);
       }
     }
     _spBodyOnLoadFunctionNames.push("begin");
     </script>

Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.