Custom Edit Form in sharepoint RRS feed

  • Question

  • I need to show content type drop down field in a custom list form(edit.aspx) in a document library.when i edit the the page using shrarepoint designer and add the custom list form, he custom list form shows all the field except the drop down for selecting the content type. Please tell how to go with it.

    Monday, May 16, 2011 6:43 AM

All replies

  • Did you add any other control in the page? and you are able to see that control in the page? Did you try to hardcode some values in the drop down field instead of content types and check if you able to see the control.

    Monday, May 16, 2011 9:03 AM
  • I had not added any other control on the page neither I had used any hardcode value in the dropdown. if I use the default "edit.aspx" the content type field is there. I had hidden the default listform Web part and instead of that added the custom list form. To make it more clear ,whenever there is more than one content type associated with a list, a choice field is there on the form with all the content types listed in the drop down. This field is missing if we use custom list form(dataform webpart) instead of listform webpart.

    Monday, May 16, 2011 11:21 AM
  • You should be able to add this field to your custom list form, just as you would add any other field. Basically, open your custom list form in SPD. Make sure you have the "Data Source Details" toobox open (View > Toolbars > Common). Click on your form in design view at the place where you want to insert the "Content Type" field. Right-click (do not click the > button; just simply right-click) and you should see a large menu, including an option for "Select". Select the entire row. Then right-click again, and you should see an option to Insert. Insert a row. Click on the specific cell where you want to put the "Content Type" field.


    Now, go to the "Data Source Details" toolbox. You should see a list of all available fields, and "Content Type" should be one of them. Click it, and only it! Now the "Insert Selected Fields as..." option displays (within the "Data Source Details" toolbox; above the field you just choose). Click "Insert Selected Fields as..." and choose "Item". This should put the "Content Form" field on your custom form. 

    Monday, May 16, 2011 9:59 PM