Here’s an often forgotten feature that any SharePoint Designer person should be aware of. It’s the ability to edit and customize the default form fields for any list. This is made possible by using SharePoint Designer to navigate and open the form page that you want to edit. When you open the page you’ll see something like this:
You’ve probably tried right clicking around, trying to convert the web part to a dataview web part, and then you threw up your hands and said this is impossible!
But wait! Check this out… First select the ListFormWebPart and *EDIT: DO NOT hit the delete key. Instead hide the webpart. If you delete it, this will happen: http://support.microsoft.com/kb/935504
Ta da! Now you can go about your daily business of form customizations.
Hi there
When i remove the title filed i get Error When i creat a new item?
And if any one know about removing the tiltle filed from list
thanks
I’ve noticed similar errors also but haven’t had a chance to figure out why. instead, i’ve used custom css to hide the fields i didn’t want instead of deleting it.
You”ll probably want to modify the content type for the list and use ShowInDisplayForm (or ShowInEditForm) to toggle the display.
Thanks for the tip Oskar, but I’m a bit confused. Where would we be able to find the ShowInDisplayForm property?
i can’t click SharePoint controls..how?thnx
You mean SharePoint Controls from the menu? Have you tried clicking onto a web part zone on the page before that?
sorry..can u explain to me step by step..i want to edit my list..thnx!
hey anne,
make the List Form Web Part invisible. (if you still get the error, you have to recreate the list first)
put your custom list form inside.
after that, simply open the web part options and activate the “Hidden” option. thats all
Hello.
I have a question regarding hidden fields. Is it possible to have fields (on a SharePoint list form) that are hidden or shown based on the selection made in another drop-down field? Or maybe a hidden sub-form?
I’ve been looking for a week for an answer to this all over the web, and I can’t seem to find it. Thanks!
Did you got the answer for this?
If so please share
i’m thinking some custom javascript on one of the form pages should do the trick.
Henry, thanks for the quick answer. Have you seen anything like that out there? If I see it, I may be able to duplicate it. Any thoughts? Thanks again.
Hello,
I am trying what you are saying, however I am still unable to use the Attachment button. I am getting a javascript error stating the the control is not available because it is hidden.
If this is the case then why not create a new form and import the custom list for into that? It does the same thing and you dont even have to touch the newform.aspx form.
Thanks for any help
Hi,
I am having the same issue with the attach button. Does anyone know how to restore the attach functionality in a modified custom form?
Hey Sandy, I vaguely remember seeing this fix introduced with SP2.
in the above thing i need to make some feilds as read only is ther any posibility in doing this
Uday,we can make the form field read only using javascript on the page load…
_spBodyOnLoadFunctionNames.push(“makeReadOnly()”);
function makeReadOnly()
{
document.getElementById(‘ctl00_PlaceHolderMain_g_99d476b6_6f5b_487c_9498_d9029f585497_ff11_1_ctl00_ctl00_TextField’).disabled = true;
//document.getElementById(‘ctl00_PlaceHolderMain_g_99d476b6_6f5b_487c_9498_d9029f585497_ff11_1_ctl00_ctl00_TextField’).readOnly=”readonly”;
}
.
.
.
Check it out
uday, after you have created your custom form, individually format the “read only” form field as “text” or “rich text” instead of as a list form item.
Hi,
is very useful. But one of my design problems thereby becomes not solved. On a wiki-site the option New Item Form is disabled. And just this I need. Is there an other possibility to do this? Thanks.
Hey Tobia, I’ve also looked into doing this but haven’t found an easy option to edit wiki new form pages.
Hi –
Thanks – I followed the instructions and customized my NewForm. But when I try to load it, I get an error. Any ideas? 🙂
” Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Windows SharePoint Services-compatible HTML editor such as Microsoft Office SharePoint Designer. If the problem persists, contact your Web server administrator. “
how do you ‘HIDE” the webpart in sharepoint designer?
Hey dhx, you can right click the web part, click on web part properties and then mark it hidden (one of the check boxes in the settings)
Thanks alot for this articale ,and i have a question … in looding this page in your example and set the value of emplyee name automatic so i made this input field disabled by javascript but the sharepoint consider this field is empty ???? meaning , when i make the field disabled sharepoint consider it as empty field any idea ???
I have tried the steps listed. However, when I try to insert a custom list, it does nothing. I don’t get an error message or anything. I am trying to edit the newform.aspx.
Any ideas?
Hey Georgia, are you inserting the custom list into a web part zone?
Folks, I am trying to mark a field as readonly so the user will not be able to edit it. The field is already populated. Thx
Does anyone have any idea how to layout a radio button group for a Choice field in SharePoint so it displays horizontal rather than vertical.
hi,
i did the following steps to get the custom lis form for a custom list i hvae created
1.Hide the default List Form Web Part from the page.
2.Go Insert > SharePoint Controls > Custom List Form.
3.In the List or Document Library Form dialog, select the appropriate list, content type and type of form.
4. Click OK and a new Data Form Web Part is not added , no error on the page also there is no error in the log files
Hi,
I have a strange behavior.
When I try to 1-Hide the default List Form Web Part from the page in the small windows I don’t have the control where you can click hide and all the other stuff but I have the page that get display. I try it on an other list and it work but the list I need to change doesn’t.
On the same list when I tried
2.Go Insert > SharePoint Controls > Custom List Form.
3.In the List or Document Library Form dialog, select the appropriate list
Nothing display in the window with no error but I try the same thing on an other list it work.
How can I fix my list to be able to create custom page to add, edit and display my data ?
Thanks,
Eric
Thanks for this posting. I am using and it does exactly what I wanted and it is easy to do.
I have one question someone might be able to help with. I am using this technique to create a custom display form. In my DispForm, I have a field that is a multi-select people field. It is displaying the HTML code instead of rendering it. How do I need to configure that field so it renders the HTML properly?
I answered my own question in case anyone else stumbles across this.
The display field needs to contain ‘disable-output-escaping=”yes”‘.
Example:
Example in last comment should be as follows within the tags for the field to be displayed:
xsl:value-of select=”@FieldName_x0020″ disable-output-escaping=”yes”/
well, hi admin adn people nice forum indeed. how’s life? hope it’s introduce branch 😉
I’m having the same problem as someone mentioned before. I’m trying to insert a New Item Custom List Form on a dispform.aspx of another list. Data Views and List Forms work fine inserting them in the display form, but when I try to insert the New Item Custom List form it is displayed in Sharepoint Designer but not in the browser… I get the following error:
“Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Windows SharePoint Services-compatible HTML editor such as Microsoft Office SharePoint Designer. If the problem persists, contact your Web server administrator.”
Not really informative…. I thought it would be something with the Data Source and the GUIDs but everything seems to be OK…
Hello Henry,
Enjoyed the site and information you have displayed. I do have one question if I may.
Have you had any luck editing the Master pages, such as People and Groups? I want to add more fields to these poeple and groups as well as be able to sort like a list by department? If this cannot be done, then how about I like Active Directory from a list so it can populate the name, department and title and I can pull in pictures of their ugly mugs. What do you think Henry? Any ideas.
Also, the trip to Korea blog was most interesting. Never been there myself though. Would like to bike ride across the country perhaps.
Thanks
Clayton
How come you don’t answer your cell phone anymore? ARe you still alive?
Hi,
Good information!
I have used the same method for custom list edit & new forms.
I have strange problem when I have a column of type spuser with people picker control the check names button does not function.
Any info will be helpful!!!
Thanks,
Hi,
I’d like to know how to control the date & time validation on the web?
thx
Wong
Hey Wong,you can probably use a custom event receiver to check for validation.
Thx Henry
Basically, the javascript as below can only handle the date validation. But, it cannot handle date and time validation in SP.
function PreSaveAction()
{
var date1 = getTagFromIdentifierAndTitle(“INPUT”,”DateTimeFieldDate”,”Start Date”);
var date2 = getTagFromIdentifierAndTitle(“INPUT”,”DateTimeFieldDate”,”End Date”);
var arrDate1 = date1.value.split(“/”);
var useDate1 = new Date(arrDate1[2], arrDate1[1]-1, arrDate1[0]);
var arrDate2 = date2.value.split(“/”);
var useDate2 = new Date(arrDate2[2], arrDate2[1]-1, arrDate2[0]);
if(useDate1 > useDate2)
{
alert(“The End Date cannot happen earlier than the Start Date”);
return false; // Cancel the item save process
}
return true; // OK to proceed with the save item
}
function getTagFromIdentifierAndTitle(tagName, identifier, title) {
var len = identifier.length;
var tags = document.getElementsByTagName(tagName);
for (var i=0; i < tags.length; i++) {
var tempString = tags[i].id;
if (tags[i].title == title && (identifier==””||tempString.indexOf(identifier)==tempString.length-len)) {
return tags[i];
}
}
return null;
}
I’ve created a custom list form. Now I’ve added new fields to the actual list. Anyone know how to go about displaying/adding these new fields to my custom list form?
Hey Al, you should be able to add the new fields by dragging it in from the list’s data source.
Hello Henry,
I will be very grateful if you can help me on this one. I have had a look at your guide and i cant get it too work. When i click “Custom List Form”, i then select the list or library i require. When i click okay (to import a new item form) … NOTHING HAPPENS. Sharepoint designer doesnt render anything. I have tried allocating a web part zone, everything. It just seems to ignore the command.
Any ideas ?
I used Sharepoint Designer and did the follwing
-Create a new ASPX page
-Insert Sharepoint Control
-Choose Custom List Form…
-Pick my custom task list and the content type and click OK.
But after this, nothing happened. I mean no code(columns of fields)has been inserted.
Another strange thing is when I open the default edit form aspx for my custom task list, it only shows three genric columns with names such as Name1, Name2, etc. It is totally different from when I run this edit form from IE or Firefox(in which all the columns shown as I expected).
Please let me know why this happened? What might I miss?
thanks
xiaoxiao
Hi Steve,
Iam using custom aspx form(developed in vs.net) in content types for edit/desplay. When i edit the list item the form will open but the form fields are not getting binded.
How to bind the form fields when a item is edited
Thanks,
Pravyn
When editing my form (newform.aspx) in sp designer 2007, I always seem to get the Invalid page URL error even if I don’t make changes to the form. This is exactly what I did, luckily I saved the list as a template to resurrect it when things went bad:
-Open newform.aspx
-Hide listformwebpart (double click, check hide)
-Hit escape (or else the insert menu is greyed out)
-Active area is now the “placeholdermain custom”
-Insert > SP Control > Custom List Form
-Selected Event & New Form
-Form data now displays correctly.
-Clicked SAVE (note, no changes except for inserting the custom list form)
-Got the message: Site Definition Page Warning – Saving your changes will customize a page from the “site definition. Are you sure you want to do this?”
-I have to click YES or else it won’t save.
-Checked my list in the browser and clicked NEW = Invalid page URL error.
Pls help… I’ve recreated this list over 20 times trying different things and it always seems to break. Any help is much appreciated!
Soooooo after about 20 tries/rebuilds, I figured out the fix. I’m posting this in hopes I can save someone from ripping their hair out.
Before you try this, please save your list as a template with “save content” checked. I’m 99.9% sure this will work for everyone, but I’m not responsible for any data loss!
-In Designer, create a copy (or copies) of the forms you’re trying to edit.
-Open up the copy (I’ll use newform in this example)
-Click on listformwebpart
-Delete the damn thing
-Follow the instructions above to Insert a new control (you should be within the Main placeholder)
-Make your changes
-SAVE the copy
-Right click on the list in the Folder View > Properties and click on the Supporting Files tab.
-Point “New item form” to the copy you’ve edited and saved.
-Hit Apply.
-Test & relax!
btw, another thing came up, I’m trying to rearrange the order of the form, but some of the fields can’t be cut/pasted. Help?
Can’t get the new url to stick. No matter what, it points back to the original file!!! Geez..
you have to set “content type specific forms:” to the content type you are using. At least that is what I had to do.
Microsoft has made the sharepointdesigner 2007 free to download down. I downloaded it with great hopes, but I gues there is only so much available in this free software. I tried adding custom list form but it is grayed out. No matter how I do it, where I click, it is greyed out. Do you have any idea if this is one thing that is not available in the free software.
follow the instructions I left above, namely: -Follow the instructions above to Insert a new control [BOLD](you should be within the Main placeholder)[END BOLD]
We have a custom list that we created, the list has several columns but would like to only display a subset of those columns to the user and then the full columns be made available to the list owner. I found a way to hide the columns but it hides them for everyone, is there anyway for a site admin or someone to see the full set of columns even though hidden? I cannot find a way to do this. I guess I do not see the benefit of offering a hidden column if no one can ever access it. Seems like should be able to hide from some but not all. Anyone ever run into this issue? Am I missing the obvious? Any help would be apprecated. PS I am new to the MOSS environment.
More in a moment on the Travertine Question. ,
Patti,
Have look at this site:http://www.infoq.com/articles/Dressel-Gogolowicz-wss-security
You can download the code/feature here:
http://code.msdn.microsoft.com/SecureField/Release/ProjectReleases.aspx?ReleaseId=1170
Will it reflect the columns if i add it newly??
No matter what I do… I can’t change the new list form of the supporting files tab. Even when I change the name it sticks to the new name… freaking dumb.
When you are changing the default files of a sharepoint list, the menu comes up showing each form (New, Edit, Display) there is a dropdown box that comes up initially as “Folder” much of the time. You must make sure that says “Item”. The “folder” setting will always seem to complete successfully, but no change will be recorded. I think this is a feature, not a bug.. lol
Hey IT Cowboy,
I did what you said, but now it won’t take me to the dispform.aspx page when i try it through the URL. Instead it takes me to the EndUserDispForm.aspx which was my customized page always.
How can I fix it so that the browser does not redirect and shows me both pages?
Thanks – IT Girl
I’m feeling a bit frustrated as I’ve done everything I can think of but I still CANNOT hide the web part in designer. When I right-click and select Web Part Properties I get the following error:
“Operation is not valid due to the current state of the object”
Any suggestions? Please?
Well after searching and trying multiple things I finally got it to work by tweaking the code.
false
I changed the code from true to false for the WebPart.
The code was zapped when I posted it so here it is again:
“false”
I changed the code from true to false for the WebPart and the web part is now hidden.
==false
If you want to customize the controls that appear on the NewForm.aspx page, and if you do not want to show the default List Form Web Part, you can hide the List Form Web Part. To do this, follow these steps:
Start SharePoint Designer 2007, and then open the NewForm.aspx page for the list.
Right-click the List Form Web Part, and then click Web Part Properties.
Expand Layout, click to select the Hidden check box, and then click OK.
You may now easily customize what fields you show or allow for editing with Malcan Worklow for Sharepoint. You decide who, what and when can edit. Check http://malcan.com please.
i have a dropdown list and a textbox in my form and when i try to edit it using desinger, i notice that all those are controls and am not able to resize the drop down list or the text box. Anyone have done that before? please help me
Here is how I solved the issue with “Insert > SharePoint Controls > Custom List Form” being greyed out:
1. Double-click to edit/open the NewForm.aspx or EditForm.aspx (or whatever).
2. Right-click on the ListFormWebPart (the column 1/2/3 thing).
3. Select ‘Properties’ (this focuses on the Tab Properties tool box pane; only Behavior & Misc show as headers for me).
4. NOW go to “Insert > SharePoint Controls > Custom List Form” and follow original screen shots from there.
_Mike
Is it a good choice to use this tool?: Kaldeera Advanced Forms (http://www.kaldeera.com/en-US/products/AdvancedForms/Pages/default.aspx)
Thanx in advance.
Pepe
Hello, you can also check PowerForms which is a silverlight webpart that fully customizes sharepoint forms. You can easily hide columns, change position and a lot other advanced tasks without coding. Give it a try, i think it will solve a lot of problems.
http://www.bpc.gr/powerforms
Thank you
I came across this problem today – after being so careful not to touch the default forms as well!
1. I closed down SPD at lunch, came back and carried on working not realising that SPD had opened the NewForm.aspx without me even asking it to – and because they all look so similar I didn’t even realise I was working on it – thought I was working on a copy of the EditForm I had created.
2. Even spookier – decided to leave broken newform as is for now as not a showstopper by any means and carried on trying to work on customising an EditForm copy – when out of the blue I noticed that whenever I created a copy of the EditForm.aspx the list properties automatically set the copy to be the supporting file and not the original. Iwent and checked on the sharepoint site and found sure enough that my list editlink now pointing to the copy file. If I hadn’t noticed it was doing that I could have carried on customising the “live” editform and breaking everything!!
This is doing my head in and I can’t find a ref to it anywhere.
In our SharePoint projects we use a tool to customize SharePoint Forms: Advanced Forms for SharePoint (http://www.kaldeera.com)
Hope this helps.
Do u have any idea how to change focus on share point page. My page contains 2- 3 web parts. But my focus goes to New Item Form web part. Because of this my scrollbar goes automatically down. Please help me to fix this. This problem i face in Internet Explorer only. Please help me to fix this.
I have a Sharepoint list with 2 views.
There are 8 columns in this list.
I want in the FORM fields of the List (where you add a New Item), 2 columns should be hidden in 1st view, and it can be seen in 2nd view.
Plz tell me how to do that???
Nice
If I don’t get an answer by tomorrow, I’ll just send
a copy of my driver’s license in with this claim form and hope that the sponsor will contact me directly if there is an issue of me proving I am me. Put in a $15 Blockbuster card, movie sized candy and a bag or two of unpopped microwave popcorn. Surrounded by giant phallus, Lady Bess remains unperturbed as she selectively photographs images for Play Girl magazine.
Hey every one! I want to make sure you are coming. Reach the Affiliate Circuit Convention this week and find me to talk company or simply straight marketing. I’m flying in one day early.
Do not just forget about Mitchells and Jareds talks. And arrive at the Badgerball – I’m likely to be there! You could even see me doing some DJing 😉
Due to most of the affiliate marketing conference and Affiliate Marketing Conference sponsors and I really hope to see you there!