Wednesday, July 27, 2016

Hide a text field in a SharePoint form using jquery

If you have several SharePoint Forms, where you want to hide the input field and using SharePoint Designer to create a custom form is not an option. Here is my collection of jQuery you can insert, using the ScriptEditor webpart.

Edit the “view” of a ListItem (DispForm.aspx)

  1. Open an element on the list, thus letting you view the DispForm.aspx page
  2. Edit the page (not the content)
  3. Insert the Scripteditor webpart
  4. Insert this code in the webpart and remember to edit the “SPBookmark_CaseID” to “SPBookmark_” + whatever name your field has
1

Edit the “new” and “edit” of a ListItem (NewItem.aspx and EditItem.aspx)

It is the same jQuery code that goes for the new item page and the edit item page.
  1. Edit a ListElement, thus letting you view the EditForm.aspx page or
  2. Add a Listelement, thus letting you view the NewForm.aspx page
  3. Edit the page (not the content)
  4. Add the Scripteditor webpart
  5. Insert the code in the webpart and remember to edit the “CaseID” to whatever name your input field has
1

Article taken from >> www.getinthesky.com

No comments:

Post a Comment