How to insert custom form into a certain Office 365 site

Design the custom SharePoint form for user requests, feedback, lead generation on any SharePoint site.

Business Requirements

Insert a custom form into a certain SharePoint site page.

Display the dialog box after the successful form filling.

Virto Software Components Used

Virto Forms Designer for Office 365

Solution Summary

A mining corporation needed to insert a custom form into a certain SharePoint Online site. The company uses the capabilities of Virto Forms Designer for Office 365 to create a custom form, and the following solution allowed to place this form to a predefined site.

After the form configuration in  Virto Forms Designer for Office 365, you need to open "General” settings on the ribbon, select “Hide Ribbon”.


Now click "CSS" editor on ribbon of Forms Designer and add css code: .ms-dialogHidden { display: none; } #contentBox { min-width: 0px; padding: 0px; margin: 0px; } #contentRow {padding-top: 0px;}


Save and add the following javascript in JavaScript editor:

$(document).ready(function() {
   var loc = window.location;
   var s =;
       var css = ".ms-dialogHidden { display: block !important; } #contentBox { margin-right: 20px !important; margin-left: 220px !important; min-width: 703px !important; } #contentRow {padding-top: 19px !important;}",
       head = document.head || document.getElementsByTagName("head")[0],
       style = document.createElement("style");
       style.type = "text/css";
       if (style.styleSheet){
       style.styleSheet.cssText = css;
       } else {

       $("#aspnetForm").attr("action",loc.pathname+"?Source=" + loc.pathname + "&isIFrame=1");

Now open the configured form in browser and copy url. At the end of the url add "&isIFrame=1"

Open the Site Page in edit mode, insert “Page Viewer” web part and click “Edit Web Part”.


Insert url to the Link field. Set fixed height and width of Web Part.


Then save changes and save the Page. After that you’ll be able to see your custom SharePoint form on the selected Page.