My suggestion to fix it would be to add this following code between theses 2 lines [...]
I don't think that's correct, the 'hidden' display is a form display, as far as I remember (please check the API documentation), so a hidden html form element would be expected for the $doc.display('hidden'), in addition to nothing being visible on the screen. please check the API documentation = there may be no clear API documentation for this type of display. In this case, the way to determine what should the hidden display do is to check the implementation for the standard displayers for all other properties (all properties that are not using custom displayers). |