Add link to button in infopath

Is there a way to add a button in infopath that contains a hyperlink. I would like to press a button that follows some rules and then takes you to a url.

If this is not possible, do you have any ideas for a work around?

SharePoint Asked by J.Choe on January 4, 2022

1 Answers

One Answer

There is no way to Redirect a "Submit button" but to add script on the page. You can do this using Designer.

Find the ID of your button and add the following code:

function setEventHandler()
 var btnSubmit = document.getElementById("ctl00_Something");

 btnSubmit.onmouseup = function(){Button.OnClick(this, event); window.location='';};

Call this function in your pageLoad or you can write the code inside your pageLoad function.

Here, onmouseup will call default method of Info Path for closing the form and then the even will be binded.

Try it and let me know if it works. I haven't tried it.

Answered by harshal gite on January 4, 2022

Add your own answers!

Related Questions

Sharepoint list field description not picked up in InfoPath form

2  Asked on December 14, 2021 by nick-atkinson


Migrate a webpart from sharepoint 2010 to sharepoint 2013

1  Asked on December 10, 2021 by grzegorz-z


Ask a Question

Get help from others!

© 2022 All rights reserved.