Hi,
I designed a custom webpart to display list items as cards. For this I created a custom "new item" button and also try to open the display form when clicking at the element title.
At first the iframe opens the default form (e.g. "DispForm.aspx?IsDlg=1"). But as soon as the form gets loaded, the whole website gets redirected to the plumsail form.
Logging in the console shows:
Panel mounted
URL: "/sites/mySite/Lists/Tickets/NewForm.aspx?IsDlg=1"
spredirect.js:1 /sites/mySite/SitePages/PlumsailForms/Tickets/Tickets/NewForm.aspx
Navigated to https://<mytenant>.sharepoint.com/sites/mySite/SitePages/PlumsailForms/Tickets/Tickets/NewForm.aspx
If we load the plumsail form direct by passing the "correct" url, it loads just fine in the panel without redirecting the parent (but that's not possible, because we use the "listinfos => forms" from @pnp/sp/forms rest call to get the "default" forms)
The right side panel is the fabric ui default panel with an iframe inside:
https://developer.microsoft.com/en-us/fluentui#/controls/web/panel
<Panel
type={PanelType.medium}
isBlocking={false}
isOpen={this.state.isOpen}
headerText={this.props.title}
className={this.props.className}
>
{ this.state.loading &&
<Spinner size={SpinnerSize.large} ></Spinner>
}
<iframe
className={"defaultClass " + (this.state.loading?this.cssClass:"")}
src={this.props.url}
onLoad={this.iframeLoaded.bind(this)}
ref={this.iFrameRef}
>
</iframe>
</Panel>
How to make it work? Thx a lot!