Open an InfoPath form on Button Click

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
pselman
Posts: 24
Joined: Wed Nov 04, 2015

05 Nov 2015

Hi,


I'm wanting to open up a particular Info Path form from a button within a form. Can you advise if this is possible and if so how?


Thanks


Paul

dap53
Posts: 3
Joined: Thu Nov 05, 2015

06 Nov 2015

Instead of using button you can simply add Hyperlink with in the form as we use it for word file. But the link must be of browser based form. Cient based forms will not work.

User avatar
rostislav
Moderator
Posts: 364
Joined: Mon Oct 19, 2015

09 Nov 2015

Add a button and add to it the following code (inside the OnClick editor of the button):

Code: Select all

fd.openForm('/Lists/MyList/MyForm.aspx');
or

Code: Select all

fd.openFormInDialog('/Lists/MyList/MyForm.aspx');
subsituting the URL as appropriate.

MFatima
Posts: 13
Joined: Wed Feb 24, 2016

23 Feb 2016

Hi,

I have successfully added a button that opens my link. How can i achieve that it opens the link a new window?

Thanks,

User avatar
rostislav
Moderator
Posts: 364
Joined: Mon Oct 19, 2015

24 Feb 2016

You can use this:

Code: Select all

window.open("/Lists/list/fd_Item_EditForm.aspx?ID=2"); 
However, whether the page is opened in a new window or tab is up to the user's browser settings. Also, the popup may get blocked by the browser.

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 13 guests