Working in SharePoint 2013, I have Parent Child lists: Request is the Parent, and Task is the Child. I have used the SharePoint Hillbilly Tabbed form for the Parent, and a web part showing the related Tasks via Connections. So far, so good. I added code in a separate web part, to open a Child New Item, and post the related ParentID:
However, once the New Form has been saved, the user finds the Parent item closed, and they have been returned to the original View. The ideal would be to open the NewFormCustom for the Child in a Dialog Box, populated with the related ParentID, and when the Child Item is saved and closed, the user will still see the Parent Request item. (If the new Child Item were to display in the list, that would be nice, but not required at this point…)
I downloaded the SP15ModalDialog.js, stored it in my jQuery library, and call it in my hillbillyForm.js
I have successfully opened the NewFormCustom in a Dialog Box, using this code:
<a href="#" onclick="openInDialog(500,600,true,true,true,'/sites/programs/ebos/Lists/Task/NewFormCustom.aspx?RootFolder=&IsDlg=1');">New Task</a>
I have not been able to open the NewFormCustom, and pass the ParentID. Here is my latest best attempt:
Thank you in advance for your help.