By default, SharePoint Lists provide default new, edit and display forms. Limitations with these forms could be as below:
- One cannot change the SharePoint List field to another field for display only purpose or other purpose.
- One cannot remove List fields/columns from a specific form(new/edit) as hiding column from any of the one form will hide that field in both forms.
- Default forms style(font/color formatting) cannot be formatted.
- One cannot use the WYSIWYG tools in default forms.
To create a CUSTOM LIST FORM and replace it with default forms. SharePoint allows you to create custom list forms in which you can apply your own style, your own controls and your set of fields to display. With the help SharePoint Designer 2007, one can create and configure custom list form to be displayed as default list forms. This article will describe how to create a custom list form, change SharePoint List Form Field to another field and replace the default list form with the custom list form.
Open SharePoint Designer 2007 and open the website under it.Create a new aspx page and save it under website. Open "Custom List Form" from Insert>SharePoint Controls Menu as shown in below image:
An List or Library selection box will appear on the screen. It allows you to
select the list and item content type for new custom form. It will also allow you
to create new/edit/display form as show below:
In our case, we will be modifying edit form. So select respective custom list, content type and "Edit item form" option as show below.
A custom list form will appear on the page. Now select any of the field that you want to change, like EMPID in my case. I will change my custom form's employee id SharePoint List Field to Label field, so it can't be changed. It's solely purpose will be to display the emp id which will be prepopulated in my case.
You can change the SharePoint List Form field to another field that matches the content type columns fields.
For instance in my case, i'm converting SharePoint List Form Field to Label Field to as it was single line of text in SharePoint List. It would be similar to image show below:
Now Save the page and close it. To configure our custom form as our list default edit form, press right click on the list that you have created custom list form of, as shown below:
Click on Properties option. A box will appear which will have five configurations which will describe the default view page options, Content type forms option, default form paths of New,Edit and Display Forms. In our case, we need to change the default edit form path to our custom form path.
As soon as you change th path and press "OK", the form path will change List default edit form path. Now whenever one will try edit list item, custom list form will appear instead of default forms provided by the list.
- Use the same steps for formatting and styling the custom forms.
- Use this approach to remove columns from the custom list forms by deleting the non-needful columns.
- Check out MSSQLTips.com for great information about Microsoft SQL Server.
Last Update: 2010-06-29
About the author
View all my tips