Giter Site home page Giter Site logo

szykov / sputility Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kitmenke/sputility

0.0 1.0 0.0 433 KB

A JavaScript library used to make modifications to SharePoint's list forms (NewForm.aspx and EditForm.aspx in a survey, custom list or library).

License: MIT License

JavaScript 60.31% CSS 1.04% HTML 38.65%

sputility's Introduction

SPUtility.js

A JavaScript library used to make modifications to SharePoint's list forms (NewForm.aspx and EditForm.aspx in a survey, custom list or library). SPUtility.js works with SharePoint 2007, 2010, and 2013.

This library depends on jQuery (tested with v1.9.0+). I recommend using version 1.x of jQuery in order to support older versions of IE.

Getting Started

Upload jQuery and SPUtility into a Document Library in your SharePoint site.

Edit the SharePoint form you wish to modify and add a Content Editor Web Part with the following script inside of it:

<script src="/site/Files/jquery.js"></script>
<script src="/site/Files/sputility.min.js"></script>
<script>
$(window).load(function () {
   // TODO: Your scripts go here!

   // EXAMPLE: Set the value of the Title field to Hello world!
   SPUtility.GetSPField('Title').SetValue('Hello world!');
});
</script>

Step by step install instructions are located here: https://sputility.codeplex.com/wikipage?title=Installation

Documentation

https://sputility.codeplex.com/documentation

Examples

// Set the value of the Title field to Hello world!
SPUtility.GetSPField('Title').SetValue('Hello world!');

// Get the value of the Title field
SPUtility.GetSPField('Title').GetValue(); // returns "Hello world!"

// Make the Title field read only
SPUtility.GetSPField('Title').MakeReadOnly();

// Hide the entire row from view
SPUtility.GetSPField('Title').Hide();

// You can also set a variable to the returned field
var fTitle = SPUtility.GetSPField('Title');
fTitle.SetValue('Using my variable!');

Contributing

Contributions are welcome! To contribute to SPUtility.js see the wiki: https://github.com/kitmenke/sputility/wiki

Release History

https://sputility.codeplex.com/wikipage?title=Changelog&referringTitle=Home

License

MIT

sputility's People

Contributors

kitmenke avatar rawkbob avatar szykov avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.