I need to open a new list item form on hyperlink, or button click, in a Sharepoint 2010 page. The page and the list are in different site collections. I must do this from the Sharepoint Designer, or directly editing the page in a browser, Visual studio project is not possible/allowed...
Can this be done, and how?
I need to open a new list item form on hyperlink, or button click, in a Sharepoint 2010 page. The page and the list are in different site collections. I must do this from the Sharepoint Designer, or directly editing the page in a browser, Visual studio project is not possible/allowed...
Can this be done, and how?
Share Improve this question asked Jan 17, 2013 at 17:17 EedohEedoh 6,2889 gold badges42 silver badges63 bronze badges1 Answer
Reset to default 3P.S. Most safe way to address New form is to use ListForm.aspx page, as follows:
/_layouts/listform.aspx?PageType=8&ListId={PUT-LIST-GUID-HERE}
(PageType value goes from PAGETYPE enumeration)
i think you should be work when use PAGE_NEWFORMDIALOG : New form for a file dialog box.Value=9
as describe on msdn. if New form is not open on model pop up than
Try this :
HyperLink
<a href='javascript:;' onclick='Opendialog()'>New Item</a>
Opendialog is Javascript Function
function Opendialog() {
var options = SP.UI.$create_DialogOptions();
options.resizable = 1;
options.scroll = 1;
options.url = SiteURLWhichExistList + "/_layouts/listform.aspx?PageType=8&ListId={PUT-LIST-GUID-HERE}";
options.dialogReturnValueCallback = Function.createDelegate(null, CloseCallback);
SP.UI.ModalDialog.showModalDialog(options);
}
Note : SiteURLWhichExistList
pass your site collection url in where your list exist.
Hope it helps!!