ArdeviaForum

Embedding list form in any page

Discussion created by ArdeviaForum on Aug 17, 2016

Original Post by dany (Imported from Ardevia Forum)

In many cases we might want to embed a new form on to a page. For example to allow users to add requests directly from the home page.

 

A list's new form can be embedded into any page using the following:

 

    • Customize the new form of the appropriate lis
    • Also add a script editor part to the form containing the following (needed to hide the ribbon when the form is embedded on a page):

<styletype="text/css">

.ms-dialog #s4-ribbonrow, .ms-dialog .ms-cui-topBar2, .ms-dialog .s4-notdlg, .ms-dialog .s4-pr s4-ribbonrowhidetitle, .ms-dialog .s4-notdlg noindex, .ms-dialog #ms-cui-ribbonTopBars, .ms-dialog #s4-titlerow, .ms-dialog #s4-pr s4-notdlg s4-titlerowhidetitle, .ms-dialog #s4-leftpanel-content {display:none !important;}

.ms-dialog .s4-ca

{margin-left:0px!important; margin-right:0px!important;}

</style>

    • Now go to the page you want to embed the form on select "Edit Page" from the site men
    • Insert a Page Viewer web part and edit the web part settings
      • The link to the new form should contain the query string parameter "IsDlg=1" (i.e. /sites/Demo/Lists/Requests/NewForm.aspx?IsDlg=1
      • Set the title, height and width as neede
    • Save the page

 

The form should correctly show on your page now.

Outcomes