Open SharePoint Form in new window

Hello,

Is there a way to make that the form open in a new window and in edit mode by default?

Thank you.

Hello @Vasilii_Burca,

When do you want to open the Edit form in a new window?

Do you wan to open a child item from parent in a new window?

Hello @mnikitina,

On form open.

I mean on double click on list item.

Thank you !

@Vasilii_Burca,

You can open the edit form by default using this code in Display Form:

fd.spForm._formType = "Edit";

Please find more details in How to open edit form by default for specific SharePoint group article.

It is not possible to open the form in a new window, but as a workaround, you can open the form in a panel and put a button into the form that opens this form in a separate tab.

1 Like

Thank you very much !!!!

1 Like

Hi @mnikitina.

When we use:

fd.spForm._formType = "Edit";

in the Display form to make it act like an Edit form I noticed that DataTable controls are not editable (behave as read only as they would be in Display form).

Can this issue be fixed please?

Thanks,
stormanh

Hello @stormanh,

This code makes the default Display form behave like an Edit form, so the DataTable must be editable.

Do you have any other custom code on the form? Please try to comment it out and test.

Also, please make sure that you are using the latest versions of the desktop designer (1.7.1) and the app package (1.0.8). You can find the instructions on how to Update the app package here.

After the update, you might need to re-save the form.

Hi @mnikitina.

Yes I have the latest app package 1.0.8 and designer 1.7.1. Used a test list from scratch to demonstrate the issue which has no custom code.

Below is the test list Display form with DataTable1 control as shown in the designer:

Here is the JS for the Display form:
fd.spForm._formType = "Edit";

When the Display form is rendered in the browser the DataTable1 control does not have the "+Add new record" button as shown below:

For the New and Edit form, the DataTable1 control is rendering fine showing the "+Add new record" button as shown below.

Hope things are clear now.

Thanks,
stormanh

Hello @stormanh,

Thank you for the details! I reproduced the issue on my tenant.

I passed the details to developers to investigate it. I will let you know as soon as I get an answer from them.