Hide Content Type on DispForm
- This topic has 4 replies, 3 voices, and was last updated 4 years, 5 months ago by .
Viewing 4 reply threads
Viewing 4 reply threads
- You must be logged in to reply to this topic.
Home › Forums › Classic DFFS › Hide Content Type on DispForm
Tagged: content type, DispForm, dispform.aspx, hide
Hi all! Is there a way to hide the mention of the Content Type at the bottom of the DispForm? I tried the following with no luck so far:
1. Creating a rule to hide that field on load of the form
2. Custom JS to hide the field on load of the form
Custom JS
function hideCT(){
spjs.dffs.hideFieldsByRule([“ContentType”]);
}
Try this line:
jQuery("span[id$='_InitContentType']").parents("table:first").hide();
Alexander
This one didn’t work :-/
It also is now showing the version number (I have versioning turned on).
Is there a way to hide these 2? I haven’t added them to the dispform under rules or the tab. They are auto appearing along with the modified info. (would love to manipulate these as well if possible)
It’s hard to tell without looking at your site, but maybe the format is different in the version I tested it in. Use the developer console to find an ID or a class you can use in a selector to hide it. Right click and select “inspect” to get started with the dev tools.
Alexander
in case anyone else is looking for this solution, based on what Alex provided I played around with it and jQuery(“tr[id=’dffs_ContentTypeChoice’]”).hide(); worked for me