I have javascript which can hide empty fields from sharepoint display form.
http://sharepointjavascript.wordpress.com/2009/10/15/hide-empty-rows-in-dispform/
I need to add programmatically this javascript to all display forms.
I dont know how to do it. Any ideas?
.eachloops through all elements which matches a specific selector. If the code below is not sufficient, change the selector ("td.ms-formbody") such that your desired elements are matched.If you’re still stuck, provide your HTML code, so that a more specific answer can be offered.