Change title of new /edit/ view list form

In SharePoint 2010 whenever you do any operation with respect to list like add,view and edit,it open in modal dialog box.

We had one of the requirement as to remove hyphen(-) from the modal title.


Edit default new form web part and add content editor web part.


create txt file add the below snippet and make refrence to the content editor

<script type=”text/javascript” src=””></script&gt;
<script language=”javascript” type=”text/javascript”>

$(document).ready(function () { ExecuteOrDelayUntilScriptLoaded(CustomAction, “sp.js”); });

function CustomAction(){
var oldText= parent.document.getElementById(“dialogTitleSpan”);
var newText=oldText.textContent.split(“-“)[0];
SP.UI.UIUtility.setInnerText(parent.document.getElementById(“dialogTitleSpan”), newText);


Save and close the page.

Now open the add new form it will have title without hyphen



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s