Loading...

RE: qListForm saving to multiple content types

RE: qListForm saving to multiple content types

Home Forums QuickApps Forum qListForm saving to multiple content types RE: qListForm saving to multiple content types

#6076
Anonymous
Anonymous
Participant

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:

http://servername/sites/appSite/Employee%20Administrative%20Processing/Lists/Employee%20Process/NewForm.aspx?Source=http%3A%2F%2Fmtsha01%3A80%2Fsites%2FAppSite%2FEmployee%2520Administrative%2520Processing%2Fdefault%2Easpx&ContentTypeId=0x01008BFEC7DB027B204D89F297DA56A236BD00B33C85BDEA565646B6232667765B45F0

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.