Pergunta

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();

Foi útil?

Solução

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();
Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange
scroll top