This project has moved. For the latest updates, please go here.

Custom Content Types not working.

Apr 11, 2016 at 5:43 PM

I created a basic custom list and a custom content type based on a "Approval" (but the behaviour is the same for any custom content type); however, I cannot select custom content types in the SPEasyForms editor to be able to access the fields from the custom content type. I've made the custom content type the default, allowed the management of content types on the list, etc.

Anyone have any ideas why this isn't working?

Apr 12, 2016 at 12:25 AM
Edited Apr 12, 2016 at 12:26 AM
Did you clear the cache (there is a clear cache button on the ribbon)?

SPEasyForms makes a lot of round trips to web services as you're paging through your site. In order to not be ungodly slow, it caches a lot of what it gets so if you return to a list it remembers things like the list schema instead of calling the web service again. In any reasonably modern browser, the cache is HTML 5 storage (there are some fallbacks, but I haven't tested them much).

What this means is that if you go to a list, add a content type to it, and then go into the SPEasyForms editor in the same browser session, it will not 'see' the newly added content type. The same is true for adding fields. The fix is to hit clear cache, which clears out the HTML 5 storage. HTML 5 storage is per browser session, so if you have multiple tabs open they are all independently caching. Either closing the tab and opening a new one or hitting clear cache in each tab should do it.

If this isn't your problem, let me know, but I pretty much always create custom content types when working with a list of any complexity, so I assure you it's not a general problem with SPEasyForms and custom content types.

Apr 13, 2016 at 2:08 PM
Thanks Joe!

That seemed to fix the issue for a new custom list I created.

But it doesn't seem the case for a Document Library I have with a custom content type that is a document set.

Is there an issue with using SPEasyForms and document libraries with custom content types? It is SharePoint so I wouldn't' be surprised...

Thanks for the fast response!

Apr 13, 2016 at 2:12 PM
Joe, one other thing...

I just tried to work with the fields from my custom content type, but none of them appear in the left-hand pane.

Any ideas?


Apr 13, 2016 at 10:43 PM
Edited Apr 14, 2016 at 12:13 AM
Sadly, the answer is yes, there is an issue, not with Document Libraries in general, but with the Document Set Content Type. The problem is that SPEasyForms only works with OOB standard forms, and there are certain lists/content types that have highly customized forms, whose DOM doesn't look anything like the standard forms. Survey's and Data Connection Libraries are two examples of lists that SPEasyForms can't deal with, because they're highly customized forms. The Document Set content type also uses a highly customized form. If you do a view source or look at it in the DOM explorer, it looks radically different than the standard forms.

Document Sets also have a number of other idiosyncrasies when it comes to working with them through workflows, event handlers, and item level permissions. They're a neat concept, but a quirky implementation and I try to stay away from them. As you said, it is SharePoint...

Marked as answer by mcsheaj on 4/28/2016 at 5:43 AM
Apr 13, 2016 at 11:07 PM
Edited Apr 14, 2016 at 2:56 PM
As for your second post, I don't have a lot of ideas. What I can tell you is that I figure out which fields to display in the form by going to and parsing the edit form of the list. I get to it as:
Where obviously the two guids are the id of the list and content type. ListForm.aspx should redirect me to whatever form is configured to be the edit form for that list and content type (PageType=6 is the edit form). So the first question is, if you manually navigate to that url, where do you end up? Does it look like you expect? i.e. your content type with all of the expected fields shown?

If the answer is no, then you need to investigate why.

If it's yes, then we need to dig a bit deeper. For me to have much chance of figuring it out, I'd need to see the source HTML of the resulting edit form, namely the table with a class of ms-formtable.

So in general, there are 3 possibilities:
  1. I can't get to the edit form using the above URL.
  2. The edit form isn't displaying the fields you want it to for some reason.
  3. I'm failing to parse the edit form to find the fields for some reason.
If you need help finding the guids, I can describe how, but if you're mucking around with custom content types I'm guessing you can figure it out ;)

Marked as answer by mcsheaj on 4/28/2016 at 5:43 AM