This project has moved. For the latest updates, please go here.

Hide fields in SP 2013

Jul 9, 2015 at 1:39 PM
Edited Jul 9, 2015 at 1:39 PM
Hello Kit,

I try to hide fileds in my sharepoint.
Created a new edit form for my list
Instaled jquery and SPUtil
Installed your testscript from Github

added the testscript in a content editor webpart in my new edit form (Top of the form)

The testscript tells me:

OK! jQuery was loaded!
OK! SPUtility was loaded!
Found a total of 0 fields!
Field list:

My list has several fields (of course :-) )

regards,

Sander
Jul 13, 2015 at 8:16 AM
some extra info:

We are using sharepoint 2013 foundation on premesis.
above result is with both internet explorer 11 and Chrome
tested with sputil 0.11.2
tested with both jquery-2.1.4 and jquery-1.11.3 in both browsers with same result
Coordinator
Jul 13, 2015 at 12:58 PM
Thanks for the extra info. Looks like everything was installed correctly but SPUtility isn't able to find any fields.

Can you tell me what type of list (custom list?) or library this is running on? I'll see if I can reproduce the issue on my end.
Jul 14, 2015 at 6:26 AM
Edited Jul 14, 2015 at 7:07 AM
Thanks for your reply

I just created a custom list (default) with one tekst field.
Then in sharepoint designer i created a new newform and set that as default.
then added the cewp with reference to the script
also tried a script editor web part with the script embedded with the same result.

so no fancy stuff. but also no results....

could this be related to this issue? (https://sputility.codeplex.com/discussions/631049)
Coordinator
Jul 14, 2015 at 2:20 PM
Unfortunately SPUtility.js won't work with forms created using SharePoint Designer. Can you try it with the out of the box forms?
Marked as answer by SanderSmit on 7/14/2015 at 11:20 PM
Jul 15, 2015 at 6:19 AM
Edited Jul 15, 2015 at 6:20 AM
Hello Kit,

so that was the answer. Thank you!
I have allways learnt not to edit standard stuff but to leave that allone and start with fresh material.

What I did is the following:
copied the complete contents of the out of the box new form to my new newform in sharepoint designer.
Edit that form in sharepoint (I first couldn't find edit page in the ribbon but found it in the cogwheel at the left upper corner..)
Now the testprogram shows me the fields in the list.
Marked as answer by SanderSmit on 7/14/2015 at 11:20 PM