Answered by:
How to pass parameters to InfoPath Form

Question
-
Ok so I know you can add an InfoPath form to a page and pass parameters via connections or query strings that way, but I'm needing to open this form directly from the document library itself because I need to have the ability to redirect the user after the form is submitted. So, I need to be able to set the Source=sdfsd.aspx etc.
Having to open the form in this way though, is there any way to pass a parameter to it?
Monday, January 7, 2013 4:27 PM
Answers
-
Hi Nerdifiedgeek,
Kiran has supplied a solution to redirect to another page after the form is closed with jQuery.
<script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function(){ if($('#DialogFinalMessage').children().length>0) { window.location.href = "<Desired destination page URL>"; } }); </script>
Thanks & Regards,
EmirEmir Liu
TechNet Community Support- Proposed as answer by Dmitry Kaloshin Thursday, January 10, 2013 12:05 PM
- Marked as answer by Nerdifiedgeek Thursday, January 10, 2013 3:46 PM
Wednesday, January 9, 2013 10:48 AM
All replies
-
I would also accept it as an answer if someone could tell me how you could redirect to another page after an InfoPath Webpart was closedMonday, January 7, 2013 5:24 PM
-
Hi Nerdifiedgeek,
Kiran has supplied a solution to redirect to another page after the form is closed with jQuery.
<script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function(){ if($('#DialogFinalMessage').children().length>0) { window.location.href = "<Desired destination page URL>"; } }); </script>
Thanks & Regards,
EmirEmir Liu
TechNet Community Support- Proposed as answer by Dmitry Kaloshin Thursday, January 10, 2013 12:05 PM
- Marked as answer by Nerdifiedgeek Thursday, January 10, 2013 3:46 PM
Wednesday, January 9, 2013 10:48 AM -
Awesome! Thank you very much :)
Would you happen to know if there is a way to pass a query string to this?
For instance if I pass a query string for an ID=5, then when you get redirected, you'll redirect back to that ID of 5?
Thursday, January 10, 2013 3:47 PM -
Hi Nerdifiedgeek,<o:p></o:p>
You can refer to this blog to get query string with jQuery.<o:p></o:p>
http://jquerybyexample.blogspot.com/2012/05/how-to-get-querystring-value-using.html<o:p></o:p>
Thanks & Regards,
Emir<o:p></o:p>Emir Liu
TechNet Community SupportFriday, January 11, 2013 5:03 AM