qListForm saving to multiple content types

qListForm saving to multiple content types

  • This topic is empty.
Viewing 3 reply threads
  • Author
    • #5362

      Hi Curtis

      Great question! I believe the dropdown to select different content types to create is in qListView if you do not want to go that far from the OOTB list view. We do not have it in qListForm. If you have the qListView connect to the list that has several content types, this dropdown list under toolbar New gives you access to create new item based on different content types.

      Now with qListForm, the content type is managed within the DisplayFields property where a dropdown list is available for content types with that list. Switch content types will reload the available fields to that content type which map the OOTB one.

      Note that qListView toolbar New dropdown list when clicked, will by default opens up the form page NewForm.aspx and carry an extra query string named "ContentTypeId" with the proper content type associated with the selected content type from the dropdown. The qListForm is intelligent enough to check for this parameter. If this parameter is presented in URL, it will switch to use the display fields for that content type and you do not need to define and configure multiple qListForm for each content type.

      In this case, you can simply configure a qListView to connect to the list having multiple content types. Configure another page or pages for NewForm, EditForm, and DispForm (or use existing ones by hiding OOTB web part). That is it and when you click New button from qListView for different content types, the form will render appropriate fields.

    • #6076

      Thanks ,

      I used your approach of using qListView "New" button drop down which allows the user to select the content type.  Once the content type is selected, the OOTB forms uses the content type selected by the user. I hid the OOTB form in newform.aspx with a configured qListForm it worked just like you said it would by creating the correct content type.

      I wanted to see the URL that qListView generates to call the OOTB newform.aspx.  However, since a list's default behavior is to use the SP2010 dialog box, I could not see the url.  So, I went into the list's advanced settings and I turned off "Launch forms in a dialog?"  By clicking qListView's New button, i was able to see the URL that is used to call the page and which passes the ContentTypeId.  The string looks like this:


      I can use the Content Editor web part and create a nicely formatted link page with links to all my forms, each using a different content type id.  The only draw back, is the urls only show the page in nondialog mode which is something the customer can live with.

      So, the summary of using content types with qListForm boils down to two approaches:

      1) use qListView's "New" button, which has a drop down for each content type defined for the list.  The new button will take you to the SharePoint OOTB newform.aspx.  You can edit that page and hide the OOTB form with qListForm and qListForm will know which Content Type to use based on the ContentTypeId paramter.

      2) You put the list in "non dialog" mode by going to the list's advanced settings and unchecking the dialog mode.  Now, you can use qListView to go the newform.aspx page based on the selected content type under the "New" button.  Once qListView takes you there, copy the URL from the browser for each content type.

      In a web part page, add a content editor web part.  Add links to all your different forms using the URL's you copied from the browser for each content type.  Once the link is clicked on your nicely formatted web page, (which might include the links and a description of each form), you will be directed to either the OOTB newform.aspx or you can replace the OOTB form with qListForm.  This solution only works in non dialog mode for newform.aspx.

      Thanks again .  Either approach is a big improvement over using OOTB ribbon for creating new content types.

    • #4258


      I’m using QWP 6.0 on SP2010.  I have a custom list with 2 content types defined.  For a simple example, lets say the 2 content types are derived using “Item” as the Parent and are setup as follows:

      Custom List Name: Employee Process

      Content Type A:

      Field A

      Field B

      Field C

      Content Type B

      Field A

      Field D

      Field E

      Both content types share Field A, but the other fields are unique and based on the content type.

      When I bind qListForm in “New” mode to the “Employee Process” list, select EzEdit, Display Fields, QWP reads:

      The list Employee Process support multiple Content Types.  Please select the Content Type that you want to configure.

      I select the second content type, “Content Type B”.  This switches the available fields to those for Content Type B.

      I select the fields from Content Type B; however, the fields from Content Type B are not show on the configured qListForm only the fields from Content Type A are show; moreover, when I try to fill in the form, only Content Type A rows are created and saved.

      Here is my question.  When a list has multilple content type defined, it seems that qListForm can only create rows based on the default content type.  In my use case, Content Type A.  Can qListForm create any other content types that are not the default? in my use case Content Type B?

      This is an important use case because native SharePoint requires the user to go to list, select “Items” from the ribbon, select the “New Items” tab from the ribbon, select one of the content types from the drop down list.  Although this works, there are alot of extra steps that can confuse the users. 

      If qListform can be configured to create rows for any content type in the list that I want, then I can, for example, have a link page that has links to web pages with qListForm already setup to the correct content type and ready to insert a row for the configured content type in one click. For example a  SharePoint web page that shows the following in a content editor web part:


      Employee Processing System.

      Click the link below to create a new request:

      New Employee Request (link)               Termination Request (Link)


      If the two links above go to a webpart page with qListForm configured in New mode for the given content type, the user is one click away from filling in the new form.

      Thanks for the help,


    • #6075

      You may save the trouble to change Launch Dialog mode in Advanced Settings of a List. When by default the dialog pops up from New button click from qListView of OOTB list view, simply right click inside the dialog and access "Properties" menu, from there you can view and copy the URL. Make sure you move cursor around to get the entire URL string as it can be long and hidden from the display.

Viewing 3 reply threads

You must be logged in to reply to this topic.