1

In my sharepoint list in the dispform.aspx , I have the headers like : title,body,send email . I want to remove only 'send email' field using css . when i checked in the developer tool , it showed that it is under '.ms-standardheader' class . when i set it to 'display:none' . It removes all other headers along with 'send email'. I just want to remove one header , how can i achieve it, how can i pick up only one control . nth child or what. thanks.

0

Open up the site where the list exist using SharePoint Designer. From the left menu, select List and Libraries and find the list where you wanna edit the form.

Click on the list and you should see 3 forms available in the window called "Forms" that will include DispForm.aspx, EditForm.aspx and NewForm.aspx.

You won't be able to modify the columns on any of these so you will have to create a new one. Select New and select the type of form to create to Display item form (used to view list items) and then mark Set as default form for the selected type.

Click on save. Now you should have a fourth form under Views, right click on it and select Edit file in advanced mode.

Now find your column send email and the HTML should look something like this (I'm using a Title column for my example):

<tr>
    <td width="190px" valign="top" class="ms-formlabel">
                            <H3 class="ms-standardheader">
                                <nobr>Title</nobr>
                            </H3>
                        </td>
                        <td width="400px" valign="top" class="ms-formbody">
                            <xsl:value-of select="@Title"/>
                        </td>
                    </tr>

On the header line with the nobr tags, add a new td tag so it looks like this.

   <tr>
        <td width="190px" valign="top" class="ms-formlabel">
                                <H3 class="ms-standardheader">
                                    <td style="display:none;"><nobr>Title</nobr></td>
                                </H3>
                            </td>
                            <td width="400px" valign="top" class="ms-formbody">
                                <xsl:value-of select="@Title"/>
                            </td>
                        </tr>

Save and make sure that the new form is set to the default.

  • thanks , but its not working . even if i put display:none !important. – Revenant_01 Jan 21 '16 at 10:46
  • Is the list added as a webpart on a page or is it the defaults list location? is the column name "Send Mail" or "send mail"? – Christoffer Jan 21 '16 at 11:20
  • And it might be as simple as i typed "send mail" instead of "send email". – Christoffer Jan 21 '16 at 11:27
  • list is added as a default OOB custom list not as a webpart. And column name is 'Send Email' type : its a checkBox ,i typed it the way you showed .i tried putting that script in the Content Editor webpart as well . but nothing's happening – Revenant_01 Jan 21 '16 at 11:40
  • Multiple webparts on the page where you added the list? – Christoffer Jan 21 '16 at 11:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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