locked
Cannot insert Related Item View into custom list form RRS feed

  • Question

  • Hi,

    I'm creating a custom list form and want to display the related items in the display and edit forms for the list. I can do it if i use "Item" content types in the custom lists but I'd prefer to use my own content types. For some reason, if I use content types in the list derived from the Item content type, the Insert Related Item button is disabled or it says it can't find any related lists.

    Is there something I'm missing here?

     

    Kind Regards

    Chris

    Sunday, March 13, 2011 3:42 AM

Answers

  • Hi Aaron,

    Thanks for the response. Will try this out. I worked around it by adding another DataView web part and configuring the filter on it.

    Friday, March 18, 2011 8:17 PM
  • Hi, Chris

     

    If you created the new form via SharePoint Designer, the new form would be rendered in a DataFormWebPart by default.

    The OOB page provides ListFormWebPart, and this webpart would read item field through mapping content type accordingly,  the DataFormWebPart could only render the fields with separate FormField control.

    You could delete the existed DataFormWebPart and add a new ListFormWebPart by in ribbon button Insert-->SharePoint-->ListForm-->Choose your custom list.

     

    Best Regards,

    Aaron

    Friday, March 18, 2011 8:22 AM

All replies

  • Hi, Chris

     

    If you created the new form via SharePoint Designer, the new form would be rendered in a DataFormWebPart by default.

    The OOB page provides ListFormWebPart, and this webpart would read item field through mapping content type accordingly,  the DataFormWebPart could only render the fields with separate FormField control.

    You could delete the existed DataFormWebPart and add a new ListFormWebPart by in ribbon button Insert-->SharePoint-->ListForm-->Choose your custom list.

     

    Best Regards,

    Aaron

    Friday, March 18, 2011 8:22 AM
  • Hi Aaron,

    Thanks for the response. Will try this out. I worked around it by adding another DataView web part and configuring the filter on it.

    Friday, March 18, 2011 8:17 PM
  •  

     Hi Aaron,

    Thank you so much for publishing this solution, I've found many blogs on how to "add related list web parts" but very few mention what to do if its not working as expected. 

    I found that when I click to add the related web part only one of several of my related lists were available, and then even if I then choose one to add, the page refreshed, BUT it doesn't then get added to the page - this is same in both browser or SP Designer.

    So - reading your blog, of course then realised I was indeed working on a custom display form.

    I found that you don't actually need to delete the existed DataFormWebPart.  (Mine was nicely formatted etc so really wanted to keep this.)

    I followed your advice to re-add in a new ListFormWebPart by in ribbon button Insert-->SharePoint-->ListForm-->Choose your custom list.

    Then I went into the html in Designer and for the list form web part and added hidden=true.

    The page now has the list view web part it needs (although hidden) to fully enable  the "add related lists option" and now it lets me add many related list web parts as appropriate in both browser and/or Designer.

    Thanks again,

    Lucy

     


    LucyBlainy
    • Proposed as answer by Caps94 Tuesday, July 30, 2013 1:53 PM
    Tuesday, April 12, 2011 10:17 AM
  • Hi Lucy

    I know this post is quite old, but I'm trying to do the same thing on a custom edit page and was wondering how you accomplished it? I've added the List Form to the page and added the hidden=true attribute. However, when I view the page I can see the list form fields along with the custom edit form fields, and more weirdly, the date fields in the custom edit form vanish.

    Where exactly on the page did you add the list form and was there anything else you had to do to get it working? I've tried adding it at the top, the bottom, in its own web part zone etc etc, but still the same problems.

    Any help would be very much appreciated.

    Duncan

    Monday, June 30, 2014 11:35 AM