Question

I'm trying to hide a dropdown field in my SharePoint 2013 NewForm.aspx page. I figured out how to hide text boxes by adding the following code snippet for a text box called "Name". However, when I try do do the same on a dropdown box that looks up job titles from another list, I can't seem to figure out how to hide that dropdown/lookup. What am I missing?

$('input[id*="Name_"]').closest("tr").hide();

Était-ce utile?

La solution

To hide a SharePoint column of the type choice - drop-down the HTML control will be a select field instead of input.

Simply,

$('select[id*="Name_"]').closest("tr").hide();
Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top