Please, help me!

I need to modify width of standard dialog form for adding element into library.

If I click to ribbon button for adding element, form opened with width=402px:

<div class="ms-dlgContent" role="dialog" aria-labelledby="dialogTitleSpan"  tabindex="-1" style="z-index: 1505; display: block; width: 402px; height: 294px; left: 430px; top: 104px; "></div>

If I click to button under all elements of current library, form opened with width=1032px:

<div class="ms-dlgContent" role="dialog" aria-labelledby="dialogTitleSpan" tabindex="-1" style="z-index: 1505; display: block; width: 1032px; height: 267px; left: 115px; top: 273px; "></div>

I can't understand, what I need to do for opening in the second case form with width=402px.

Maybe need enter some code in Upload.aspx? (this form generate automatically) I guess, this page open for creating new element, because schema.xml for my list definition contain this code:

   <Form Type="DisplayForm" SetupPath="pages\form.aspx" Url="Forms/DispForm.aspx" WebPartZoneID="Main" />
   <Form Type="EditForm" SetupPath="pages\form.aspx" Url="Forms/EditForm.aspx" WebPartZoneID="Main" />
   <Form Type="NewForm" Url="Forms/Upload.aspx" WebPartZoneID="Main" />

But if modify this part of Upload.aspx (add .ms-dglContent class), it doesn't help me:

<asp:Content ContentPlaceHolderId="PlaceHolderBodyAreaClass" runat="server">
<style type="text/css">
.ms-bodyareaframe {
padding: 8px;
border: none;
.ms-dglContent {

If I modify css files:

.ms-dglContent {width:402px!important;}

it modify all dialog forms, but in my case is unacceptable.

I would be grateful for any attempt to help!

3 Answers 3


@Kate Ponomareva sorry for the delayed reply (wasn't online), follow below steps to add html form webpart

1 : through SPD, create your required forms for the respective list and set them as default or you could use the default form itself

2 : go to your sharepoint site, click on the list from View All Site content or Quick Launch

3 : in top ribbon click on List (List Tools)

4 : towards right you will see option as Form Web Parts, click on it, the three forms will be listed there [New Form, Display Form, Edit Form]

5 : select the one on which you want to increase the width/height

6 : it will open in edit mode, click on Add a Web Part

7 : Click on Forms [Categories] => HTML Form Web Part

8 : After adding the HTML Form Web Part, click on Edit Webpart

9 : Click on Source Editor, Remove all code from it and put a empty HTML table with width and height as per your requirement ex. to increase width

<TABLE WIDTH="800px"> <TR><TD></TD></TR> </TABLE>

10: save the form and check out your respective modal by clicking on the same in your list view

  • +1 This makes a lot more sense; thanks for coming back and clarifying. Unfortunately It's standard practice to edit extra details into your existing answer: SE won't let me undo my earlier downvote without an edit to that answer.
    – Stu Pegg
    Commented Sep 26, 2012 at 8:22
  • @StuartPegg , that's fine! there are so many things on SharePoint which are still not into any documentation or eBook!
    – prashant
    Commented Sep 26, 2012 at 8:26

In SharePoint Designer 2010, turns out you just go to Data View Tools > Web Part > Width, and type in the new width of the form. In the code, it looks like:

<WebPartPages:DataFormWebPart runat="server" ...... Width="1000">


insert a html form webpart into the add form , include code into the same of a blank html table setting the width as per your preference.

  • Great idea! but.. How I can insert a html form webpart into the add form? Commented Sep 20, 2012 at 7:00
  • -1 I'm afraid at the moment this answer doesn't seem to make any sense: Web parts cannot be added to the dialog forms by default.
    – Stu Pegg
    Commented Sep 24, 2012 at 21:14
  • @StuartPegg I'm afraid you didn't had the idea of how to do it that's why it didn't make any sense to you, my first reply was for a person who had enough idea on SharePoint list forms and ribbon controls, do not come to a conclusion so early!
    – prashant
    Commented Sep 26, 2012 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.