Hide "Content Type" field on EditForm.aspx

Sep 21, 2010 at 7:41 PM

Can jPoint be used to hide the "Content Type" field on the EditForm.aspx?

I can get it to work on just about every field but the "Content Type" field.

Any assistance would be greatly appreciated.

Oct 7, 2010 at 5:59 AM

There's a bug in jPoint that it currently does not parse and recognize the "Content Type" field correctly. 

As a workaround, you can also reference the field by order.  In this case, since it is the first field on the edit form hide it by using the follow code

Oct 13, 2010 at 2:57 PM
Edited Oct 13, 2010 at 6:32 PM


Thanks for the reply.  I tried:


but it did not work.

Apparently, "Content Type" is not a member of Items.  Items[0] hides the first field below "Content Type" :(

I plugged jPFormInspector.js into my form and "Content Type" shows up as the zero element of jP.Form.Schema.

Any way to hide it using jP.Form.Schema??

If you have any other ideas, please post them.



PS -jPFormInspector.js is really slick. 
Oct 15, 2010 at 6:28 PM


Can you send what you see in jP.Form.Items and jP.Form.Schema?


Oct 21, 2010 at 4:51 PM

If your list is on the root site, try

jP.Form.readForm("/"); //add before any other reference to jP.Form to initialize object with list information
//Reference Content Type field with 
var jpfield = jP.Form.Items[0]; //get jpoint field
var opt = $(jP.Form.Items[0].ItemRow).find("select option:selected"); //get select option
var value = opt.val(); //get id of content type
var disptext = opt.text(); //opt.html(); //displayed text