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.
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.