Wednesday 4 January 2017

How to redirect to home page after submitting/closing InfoPath form:

     
  Ø     Go to the list and click on add new item.
  Ø    After the form appears, copy the URL.

Example:
http://ABCD1234:1234/sites/MY_SITE/Lists/MY_LIST/Item/newifs.aspx?List=5c408_TEST237464fa%2D4571%2D8ccb%2D782f9DHFD779D&Source=http_TEST%3A%2F%2FABCD1234:1234%3A2407%2Fsites%MY_SITE%2FLists%2FMY_LIST%2FAllItems%2Easpx&RootFolder=& Web=1c43f31645642%2_TESTD1004%2D671c7%2D96c0%2D5c62515af56785

http:// SERVER NAME /sites/ SITE NAME /Lists/LIST NAME /Item/newifs.aspx?List=LIST ID &Source=WRITE THE URL WHERE YOU WANT TO REDIRECT AFTER SUBMIT/CLOSE &RootFolder=&Web=WEB ID

  Ø  Suppose you have a button or anchor tag in home page as mentioned below, on click of which it is opening the InfoPath form.

Example:
<button type="button" onclick="location.href = #" class="btn_class" style="padding: 19px 75px; border: medium none currentcolor; text-align: center; color: white; font-size: 17px; text-decoration: none; margin-top: -8px; margin-left: 310px; display: inline-block; cursor: pointer; background-color: #002966;"> Click Me !!! </button>
Or
<a href=" # ">Click me</a>

  Ø    Go to edit page and Open the button content by clicking on “Edit Source”.
  Ø    In the above two examples replace the “#” with the URL mentioned above.
  Ø    Save the page.
  Ø    Note: Careful while coping the new form url. Only edit that portion of the url where it mentioned “WRITE THE URL WHERE YOU WANT TO REDIRECT AFTER SUBMIT/CLOSE.” It is not required to change the other portions. Means only source link (Source=) needs to be changed.




No comments:

Post a Comment