SlideShare a Scribd company logo
SPTechCon San Fransicso 2014
Using jQuery to Maximize SharePoint Form
Usability
Mark.Rackley@capSpire.com
April, Twenty Fourteen
Mark Rackley / Senior Consultant
• 19+ years software
architecture and development
experience
• SharePoint Junkie since 2007
• Event Organizer
• Blogger, Writer, Speaker
• Bacon aficionado
@mrackley
www.SharePointHillbilly.com
www.MarkRackley.net
www.SharePointaLooza.org
Agenda
• What’s and Why’s
• The Basics
• Automatic Parent / Child relationship
• Showing / Hiding Fields
• Custom field validation
• Using REST for cascading drop down lists
• Improving form layout using HTML Templates
What Exactly Are We Going To Be Doing?
Create powerful dynamic forms
Create visually appealing forms
Use HTML, JavaScript
Utilize existing default New and Edit Forms
Why Are We Doing This?
Default SharePoint Forms are ugly
Default SharePoint Forms aren’t dynamic
Creating new forms from scratch is time
consuming and cumbersome
InfoPath is not the right approach for many
scenarios (and it’s going away yay!)
What Skills Do I Need?
HTML / CSS
 Create Pretty forms
JavaScript / jQuery
 Create dynamic forms
REST / CSOM / SPServices
 Create powerful forms
The Basis
Create a script and place it in a Document
Library
Edit the Default New or Edit Form for a
List/Library
Add a Content Editor Web Part to the default
form
Link Script to the Content Editor Web Part
The Basics – Editing the Default Form
From a list view on the
ribbon, click on the “List”
tab
Click on the “Modify
Form Web Parts” button
and select the form to
edit.
The Basics – Identifying Form Elements
Use the “title” attribute when possible to
retrieve a field
 <select title="City" id="City_310b7c27-13ba-4a7e-
a133-058d312a6b7f_$LookupField">
 $(“select*title=‘City’+”);
 Be careful of DOM changes (ie “Required Fields)
 <select title="City Required Field" id="City_310b7c27-
13ba-4a7e-a133-058d312a6b7f_$LookupField">
The Basics – Identifying Form Elements
Use the “FieldName” or “FieldInternalName”
stored in the comments if necessary
 <td width="350" class="ms-formbody" valign="top">
<!-- FieldName="City" FieldInternalName="City"
FieldType="SPFieldLookup“ -->
 $("table.ms-formtable td").each(function(){
if (this.innerHTML.indexOf('FieldName=“City"') != -1)
{
var field = this;
}
});
The Basic – Interacting with basic form fields
//get input / select values
$(“select*title=‘City’+”).val();
//set input / select values
$(“select*title=‘City’+”).val(“value”);
//uncheck a check box
$(“input*title=‘City’+").removeAttr('checked');
//check a check box
$(“input*title=‘City’+").attr('checked','checked');
//is a check box checked?
if ($(“input*title=‘City’+”).is(':checked'))
Showing / Hiding Fields
Show/Hide the field’s entire row to ensure the label is
not visible
 $(“select*title=‘City’+”).closest(“tr”).hide();
Attach to click event of field to trigger showing/hiding
 $(“input*title=‘myCheckbox’+”).click(function()
{
if ($(this).is(‘:checked’))
{
hide or show fields
}
});
Demo: Add jQuery to default form and learn
how to identify elements
Demo: Automatic Parent / Child List
Relationship
Demo: Showing / Hiding fields when a check
box is checked
Demo: Custom Field Validation
Demo: Using REST for Cascading Drop Down
Lists
Demo: Improving Form Layout using HTML
Templates
April, Twenty Fourteen
Ad

More Related Content

What's hot (20)

#SPSTC Maximizing the SharePoint User Experience with Free 3rd Party jQuery L...
#SPSTC Maximizing the SharePoint User Experience with Free 3rd Party jQuery L...#SPSTC Maximizing the SharePoint User Experience with Free 3rd Party jQuery L...
#SPSTC Maximizing the SharePoint User Experience with Free 3rd Party jQuery L...
Mark Rackley
 
Intro to SharePoint Web Services
Intro to SharePoint Web ServicesIntro to SharePoint Web Services
Intro to SharePoint Web Services
Mark Rackley
 
(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide
Mark Rackley
 
SharePoint & jQuery Guide - SPSTC 5/18/2013
SharePoint & jQuery Guide - SPSTC 5/18/2013 SharePoint & jQuery Guide - SPSTC 5/18/2013
SharePoint & jQuery Guide - SPSTC 5/18/2013
Mark Rackley
 
SPTechCon 2014 How to develop and debug client side code in SharePoint
SPTechCon 2014 How to develop and debug client side code in SharePointSPTechCon 2014 How to develop and debug client side code in SharePoint
SPTechCon 2014 How to develop and debug client side code in SharePoint
Mark Rackley
 
SharePoint & jQuery Guide - SPSNashville 2014
SharePoint & jQuery Guide - SPSNashville 2014SharePoint & jQuery Guide - SPSNashville 2014
SharePoint & jQuery Guide - SPSNashville 2014
Mark Rackley
 
Introduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointIntroduction to using jQuery with SharePoint
Introduction to using jQuery with SharePoint
Rene Modery
 
Transform SharePoint default list forms with HTML, CSS and JavaScript
Transform SharePoint default list forms with HTML, CSS and JavaScriptTransform SharePoint default list forms with HTML, CSS and JavaScript
Transform SharePoint default list forms with HTML, CSS and JavaScript
John Calvert
 
SPSNH 2014 - The SharePoint & jQueryGuide
SPSNH 2014 - The SharePoint & jQueryGuideSPSNH 2014 - The SharePoint & jQueryGuide
SPSNH 2014 - The SharePoint & jQueryGuide
Mark Rackley
 
SharePoint REST vs CSOM
SharePoint REST vs CSOMSharePoint REST vs CSOM
SharePoint REST vs CSOM
Mark Rackley
 
Transform SharePoint List Forms with HTML and CSS
Transform SharePoint List Forms with HTML and CSSTransform SharePoint List Forms with HTML and CSS
Transform SharePoint List Forms with HTML and CSS
John Calvert
 
Introduction to Client Side Dev in SharePoint Workshop
Introduction to Client Side Dev in SharePoint WorkshopIntroduction to Client Side Dev in SharePoint Workshop
Introduction to Client Side Dev in SharePoint Workshop
Mark Rackley
 
Content by query web part
Content by query web partContent by query web part
Content by query web part
IslamKhattab
 
SharePoint 2013 Client Side Rendering
SharePoint 2013 Client Side RenderingSharePoint 2013 Client Side Rendering
SharePoint 2013 Client Side Rendering
Bill Wolff
 
SPSSTHLM - Using JSLink and Display Templates for ITPros
SPSSTHLM - Using JSLink and Display Templates for ITProsSPSSTHLM - Using JSLink and Display Templates for ITPros
SPSSTHLM - Using JSLink and Display Templates for ITPros
Paul Hunt
 
SPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have knownSPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have known
Mark Rackley
 
Getting The Most Out Of SP Search SPSTC
Getting The Most Out Of SP Search SPSTCGetting The Most Out Of SP Search SPSTC
Getting The Most Out Of SP Search SPSTC
John Ross
 
SEF2013 - A jQuery Primer for SharePoint
SEF2013 - A jQuery Primer for SharePointSEF2013 - A jQuery Primer for SharePoint
SEF2013 - A jQuery Primer for SharePoint
Marc D Anderson
 
O365 Saturday - Deepdive SharePoint Client Side Rendering
O365 Saturday - Deepdive SharePoint Client Side RenderingO365 Saturday - Deepdive SharePoint Client Side Rendering
O365 Saturday - Deepdive SharePoint Client Side Rendering
Riwut Libinuko
 
Using js link and display templates
Using js link and display templatesUsing js link and display templates
Using js link and display templates
Paul Hunt
 
#SPSTC Maximizing the SharePoint User Experience with Free 3rd Party jQuery L...
#SPSTC Maximizing the SharePoint User Experience with Free 3rd Party jQuery L...#SPSTC Maximizing the SharePoint User Experience with Free 3rd Party jQuery L...
#SPSTC Maximizing the SharePoint User Experience with Free 3rd Party jQuery L...
Mark Rackley
 
Intro to SharePoint Web Services
Intro to SharePoint Web ServicesIntro to SharePoint Web Services
Intro to SharePoint Web Services
Mark Rackley
 
(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide
Mark Rackley
 
SharePoint & jQuery Guide - SPSTC 5/18/2013
SharePoint & jQuery Guide - SPSTC 5/18/2013 SharePoint & jQuery Guide - SPSTC 5/18/2013
SharePoint & jQuery Guide - SPSTC 5/18/2013
Mark Rackley
 
SPTechCon 2014 How to develop and debug client side code in SharePoint
SPTechCon 2014 How to develop and debug client side code in SharePointSPTechCon 2014 How to develop and debug client side code in SharePoint
SPTechCon 2014 How to develop and debug client side code in SharePoint
Mark Rackley
 
SharePoint & jQuery Guide - SPSNashville 2014
SharePoint & jQuery Guide - SPSNashville 2014SharePoint & jQuery Guide - SPSNashville 2014
SharePoint & jQuery Guide - SPSNashville 2014
Mark Rackley
 
Introduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointIntroduction to using jQuery with SharePoint
Introduction to using jQuery with SharePoint
Rene Modery
 
Transform SharePoint default list forms with HTML, CSS and JavaScript
Transform SharePoint default list forms with HTML, CSS and JavaScriptTransform SharePoint default list forms with HTML, CSS and JavaScript
Transform SharePoint default list forms with HTML, CSS and JavaScript
John Calvert
 
SPSNH 2014 - The SharePoint & jQueryGuide
SPSNH 2014 - The SharePoint & jQueryGuideSPSNH 2014 - The SharePoint & jQueryGuide
SPSNH 2014 - The SharePoint & jQueryGuide
Mark Rackley
 
SharePoint REST vs CSOM
SharePoint REST vs CSOMSharePoint REST vs CSOM
SharePoint REST vs CSOM
Mark Rackley
 
Transform SharePoint List Forms with HTML and CSS
Transform SharePoint List Forms with HTML and CSSTransform SharePoint List Forms with HTML and CSS
Transform SharePoint List Forms with HTML and CSS
John Calvert
 
Introduction to Client Side Dev in SharePoint Workshop
Introduction to Client Side Dev in SharePoint WorkshopIntroduction to Client Side Dev in SharePoint Workshop
Introduction to Client Side Dev in SharePoint Workshop
Mark Rackley
 
Content by query web part
Content by query web partContent by query web part
Content by query web part
IslamKhattab
 
SharePoint 2013 Client Side Rendering
SharePoint 2013 Client Side RenderingSharePoint 2013 Client Side Rendering
SharePoint 2013 Client Side Rendering
Bill Wolff
 
SPSSTHLM - Using JSLink and Display Templates for ITPros
SPSSTHLM - Using JSLink and Display Templates for ITProsSPSSTHLM - Using JSLink and Display Templates for ITPros
SPSSTHLM - Using JSLink and Display Templates for ITPros
Paul Hunt
 
SPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have knownSPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have known
Mark Rackley
 
Getting The Most Out Of SP Search SPSTC
Getting The Most Out Of SP Search SPSTCGetting The Most Out Of SP Search SPSTC
Getting The Most Out Of SP Search SPSTC
John Ross
 
SEF2013 - A jQuery Primer for SharePoint
SEF2013 - A jQuery Primer for SharePointSEF2013 - A jQuery Primer for SharePoint
SEF2013 - A jQuery Primer for SharePoint
Marc D Anderson
 
O365 Saturday - Deepdive SharePoint Client Side Rendering
O365 Saturday - Deepdive SharePoint Client Side RenderingO365 Saturday - Deepdive SharePoint Client Side Rendering
O365 Saturday - Deepdive SharePoint Client Side Rendering
Riwut Libinuko
 
Using js link and display templates
Using js link and display templatesUsing js link and display templates
Using js link and display templates
Paul Hunt
 

Similar to Using jQuery to Maximize Form Usability (20)

Quick & Easy SharePoint Forms with StratusForms
Quick & Easy SharePoint Forms with StratusFormsQuick & Easy SharePoint Forms with StratusForms
Quick & Easy SharePoint Forms with StratusForms
April Dunnam
 
The SharePoint & jQuery Guide
The SharePoint & jQuery GuideThe SharePoint & jQuery Guide
The SharePoint & jQuery Guide
Mark Rackley
 
The SharePoint and jQuery Guide by Mark Rackley - SPTechCon
The SharePoint and jQuery Guide by Mark Rackley - SPTechConThe SharePoint and jQuery Guide by Mark Rackley - SPTechCon
The SharePoint and jQuery Guide by Mark Rackley - SPTechCon
SPTechCon
 
Introducing the JotSpot Data Model and API
Introducing the JotSpot Data Model and APIIntroducing the JotSpot Data Model and API
Introducing the JotSpot Data Model and API
Scott McMullan
 
User Profiles: I Didn't Know I Could Do That (Updated Demo)
User Profiles:  I Didn't Know I Could Do That (Updated Demo)User Profiles:  I Didn't Know I Could Do That (Updated Demo)
User Profiles: I Didn't Know I Could Do That (Updated Demo)
Stacy Deere
 
Your SharePoint 2013 Branding Initiation
Your SharePoint 2013 Branding InitiationYour SharePoint 2013 Branding Initiation
Your SharePoint 2013 Branding Initiation
Eric Overfield
 
Intro to InfoPath Workflow
Intro to InfoPath WorkflowIntro to InfoPath Workflow
Intro to InfoPath Workflow
Nikkia Carter
 
Designing SharePoint 2010 for Business
Designing SharePoint 2010 for BusinessDesigning SharePoint 2010 for Business
Designing SharePoint 2010 for Business
Kanwal Khipple
 
Let's build an adoption centre in office 365
Let's build an adoption centre in office 365Let's build an adoption centre in office 365
Let's build an adoption centre in office 365
Joanne Klein
 
Share Point
Share PointShare Point
Share Point
jimbelo
 
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
Kiril Iliev
 
Column Formatter in SharePoint Online
Column Formatter in SharePoint OnlineColumn Formatter in SharePoint Online
Column Formatter in SharePoint Online
Mark Rackley
 
Where did design view go in SharePoint Designer
Where did design view go in SharePoint DesignerWhere did design view go in SharePoint Designer
Where did design view go in SharePoint Designer
Patrick O'Toole
 
SharePoint and jQuery Essentials
SharePoint and jQuery EssentialsSharePoint and jQuery Essentials
SharePoint and jQuery Essentials
Mark Rackley
 
SharePoint Saturday Belgium 2014 - Using JSLink and Display Templates with th...
SharePoint Saturday Belgium 2014 - Using JSLink and Display Templates with th...SharePoint Saturday Belgium 2014 - Using JSLink and Display Templates with th...
SharePoint Saturday Belgium 2014 - Using JSLink and Display Templates with th...
BIWUG
 
PowerApps vs InfoPath - SPSVB 2019
PowerApps vs InfoPath - SPSVB 2019PowerApps vs InfoPath - SPSVB 2019
PowerApps vs InfoPath - SPSVB 2019
Nikkia Carter
 
SPSTC - SharePoint & jQuery Essentials
SPSTC - SharePoint & jQuery EssentialsSPSTC - SharePoint & jQuery Essentials
SPSTC - SharePoint & jQuery Essentials
Mark Rackley
 
SUGUK Cambridge - Display Templates & JSLink for IT Pros
SUGUK Cambridge - Display Templates & JSLink for IT ProsSUGUK Cambridge - Display Templates & JSLink for IT Pros
SUGUK Cambridge - Display Templates & JSLink for IT Pros
Paul Hunt
 
Spsbe using js-linkanddisplaytemplates
Spsbe   using js-linkanddisplaytemplatesSpsbe   using js-linkanddisplaytemplates
Spsbe using js-linkanddisplaytemplates
Paul Hunt
 
How to create site content types in share point online and descrption
How to create site content types in share point online and descrptionHow to create site content types in share point online and descrption
How to create site content types in share point online and descrption
Prashant Kumar Singh
 
Quick & Easy SharePoint Forms with StratusForms
Quick & Easy SharePoint Forms with StratusFormsQuick & Easy SharePoint Forms with StratusForms
Quick & Easy SharePoint Forms with StratusForms
April Dunnam
 
The SharePoint & jQuery Guide
The SharePoint & jQuery GuideThe SharePoint & jQuery Guide
The SharePoint & jQuery Guide
Mark Rackley
 
The SharePoint and jQuery Guide by Mark Rackley - SPTechCon
The SharePoint and jQuery Guide by Mark Rackley - SPTechConThe SharePoint and jQuery Guide by Mark Rackley - SPTechCon
The SharePoint and jQuery Guide by Mark Rackley - SPTechCon
SPTechCon
 
Introducing the JotSpot Data Model and API
Introducing the JotSpot Data Model and APIIntroducing the JotSpot Data Model and API
Introducing the JotSpot Data Model and API
Scott McMullan
 
User Profiles: I Didn't Know I Could Do That (Updated Demo)
User Profiles:  I Didn't Know I Could Do That (Updated Demo)User Profiles:  I Didn't Know I Could Do That (Updated Demo)
User Profiles: I Didn't Know I Could Do That (Updated Demo)
Stacy Deere
 
Your SharePoint 2013 Branding Initiation
Your SharePoint 2013 Branding InitiationYour SharePoint 2013 Branding Initiation
Your SharePoint 2013 Branding Initiation
Eric Overfield
 
Intro to InfoPath Workflow
Intro to InfoPath WorkflowIntro to InfoPath Workflow
Intro to InfoPath Workflow
Nikkia Carter
 
Designing SharePoint 2010 for Business
Designing SharePoint 2010 for BusinessDesigning SharePoint 2010 for Business
Designing SharePoint 2010 for Business
Kanwal Khipple
 
Let's build an adoption centre in office 365
Let's build an adoption centre in office 365Let's build an adoption centre in office 365
Let's build an adoption centre in office 365
Joanne Klein
 
Share Point
Share PointShare Point
Share Point
jimbelo
 
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
Kiril Iliev
 
Column Formatter in SharePoint Online
Column Formatter in SharePoint OnlineColumn Formatter in SharePoint Online
Column Formatter in SharePoint Online
Mark Rackley
 
Where did design view go in SharePoint Designer
Where did design view go in SharePoint DesignerWhere did design view go in SharePoint Designer
Where did design view go in SharePoint Designer
Patrick O'Toole
 
SharePoint and jQuery Essentials
SharePoint and jQuery EssentialsSharePoint and jQuery Essentials
SharePoint and jQuery Essentials
Mark Rackley
 
SharePoint Saturday Belgium 2014 - Using JSLink and Display Templates with th...
SharePoint Saturday Belgium 2014 - Using JSLink and Display Templates with th...SharePoint Saturday Belgium 2014 - Using JSLink and Display Templates with th...
SharePoint Saturday Belgium 2014 - Using JSLink and Display Templates with th...
BIWUG
 
PowerApps vs InfoPath - SPSVB 2019
PowerApps vs InfoPath - SPSVB 2019PowerApps vs InfoPath - SPSVB 2019
PowerApps vs InfoPath - SPSVB 2019
Nikkia Carter
 
SPSTC - SharePoint & jQuery Essentials
SPSTC - SharePoint & jQuery EssentialsSPSTC - SharePoint & jQuery Essentials
SPSTC - SharePoint & jQuery Essentials
Mark Rackley
 
SUGUK Cambridge - Display Templates & JSLink for IT Pros
SUGUK Cambridge - Display Templates & JSLink for IT ProsSUGUK Cambridge - Display Templates & JSLink for IT Pros
SUGUK Cambridge - Display Templates & JSLink for IT Pros
Paul Hunt
 
Spsbe using js-linkanddisplaytemplates
Spsbe   using js-linkanddisplaytemplatesSpsbe   using js-linkanddisplaytemplates
Spsbe using js-linkanddisplaytemplates
Paul Hunt
 
How to create site content types in share point online and descrption
How to create site content types in share point online and descrptionHow to create site content types in share point online and descrption
How to create site content types in share point online and descrption
Prashant Kumar Singh
 
Ad

More from Mark Rackley (10)

SharePoint Conference North America - Converting your JavaScript to SPFX
SharePoint Conference North America - Converting your JavaScript to SPFXSharePoint Conference North America - Converting your JavaScript to SPFX
SharePoint Conference North America - Converting your JavaScript to SPFX
Mark Rackley
 
A Power User's Introduction to jQuery Awesomeness in SharePoint
A Power User's Introduction to jQuery Awesomeness in SharePointA Power User's Introduction to jQuery Awesomeness in SharePoint
A Power User's Introduction to jQuery Awesomeness in SharePoint
Mark Rackley
 
Utilizing jQuery in SharePoint: Get More Done Faster
Utilizing jQuery in SharePoint: Get More Done FasterUtilizing jQuery in SharePoint: Get More Done Faster
Utilizing jQuery in SharePoint: Get More Done Faster
Mark Rackley
 
Citizen Developers Intro to jQuery Customizations in SharePoint
Citizen Developers Intro to jQuery Customizations in SharePointCitizen Developers Intro to jQuery Customizations in SharePoint
Citizen Developers Intro to jQuery Customizations in SharePoint
Mark Rackley
 
A Power User's intro to jQuery awesomeness in SharePoint
A Power User's intro to jQuery awesomeness in SharePointA Power User's intro to jQuery awesomeness in SharePoint
A Power User's intro to jQuery awesomeness in SharePoint
Mark Rackley
 
NOW I Get it!! What SharePoint IS and why I need it
NOW I Get it!! What SharePoint IS and why I need itNOW I Get it!! What SharePoint IS and why I need it
NOW I Get it!! What SharePoint IS and why I need it
Mark Rackley
 
What is SharePoint Development??
What is SharePoint Development??What is SharePoint Development??
What is SharePoint Development??
Mark Rackley
 
Wrapping your head around the SharePoint Beast (For the rest of us)
Wrapping your head around the SharePoint Beast (For the rest of us)Wrapping your head around the SharePoint Beast (For the rest of us)
Wrapping your head around the SharePoint Beast (For the rest of us)
Mark Rackley
 
What IS SharePoint Development?
What IS SharePoint Development?What IS SharePoint Development?
What IS SharePoint Development?
Mark Rackley
 
SharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentialsSharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentials
Mark Rackley
 
SharePoint Conference North America - Converting your JavaScript to SPFX
SharePoint Conference North America - Converting your JavaScript to SPFXSharePoint Conference North America - Converting your JavaScript to SPFX
SharePoint Conference North America - Converting your JavaScript to SPFX
Mark Rackley
 
A Power User's Introduction to jQuery Awesomeness in SharePoint
A Power User's Introduction to jQuery Awesomeness in SharePointA Power User's Introduction to jQuery Awesomeness in SharePoint
A Power User's Introduction to jQuery Awesomeness in SharePoint
Mark Rackley
 
Utilizing jQuery in SharePoint: Get More Done Faster
Utilizing jQuery in SharePoint: Get More Done FasterUtilizing jQuery in SharePoint: Get More Done Faster
Utilizing jQuery in SharePoint: Get More Done Faster
Mark Rackley
 
Citizen Developers Intro to jQuery Customizations in SharePoint
Citizen Developers Intro to jQuery Customizations in SharePointCitizen Developers Intro to jQuery Customizations in SharePoint
Citizen Developers Intro to jQuery Customizations in SharePoint
Mark Rackley
 
A Power User's intro to jQuery awesomeness in SharePoint
A Power User's intro to jQuery awesomeness in SharePointA Power User's intro to jQuery awesomeness in SharePoint
A Power User's intro to jQuery awesomeness in SharePoint
Mark Rackley
 
NOW I Get it!! What SharePoint IS and why I need it
NOW I Get it!! What SharePoint IS and why I need itNOW I Get it!! What SharePoint IS and why I need it
NOW I Get it!! What SharePoint IS and why I need it
Mark Rackley
 
What is SharePoint Development??
What is SharePoint Development??What is SharePoint Development??
What is SharePoint Development??
Mark Rackley
 
Wrapping your head around the SharePoint Beast (For the rest of us)
Wrapping your head around the SharePoint Beast (For the rest of us)Wrapping your head around the SharePoint Beast (For the rest of us)
Wrapping your head around the SharePoint Beast (For the rest of us)
Mark Rackley
 
What IS SharePoint Development?
What IS SharePoint Development?What IS SharePoint Development?
What IS SharePoint Development?
Mark Rackley
 
SharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentialsSharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentials
Mark Rackley
 
Ad

Recently uploaded (20)

Webinar - Top 5 Backup Mistakes MSPs and Businesses Make .pptx
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make   .pptxWebinar - Top 5 Backup Mistakes MSPs and Businesses Make   .pptx
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make .pptx
MSP360
 
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
SOFTTECHHUB
 
AsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API DesignAsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API Design
leonid54
 
fennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solutionfennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solution
shallal2
 
AI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of DocumentsAI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of Documents
UiPathCommunity
 
Play It Safe: Manage Security Risks - Google Certificate
Play It Safe: Manage Security Risks - Google CertificatePlay It Safe: Manage Security Risks - Google Certificate
Play It Safe: Manage Security Risks - Google Certificate
VICTOR MAESTRE RAMIREZ
 
Viam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdfViam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdf
camilalamoratta
 
Unlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web AppsUnlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web Apps
Maximiliano Firtman
 
AI You Can Trust: The Critical Role of Governance and Quality.pdf
AI You Can Trust: The Critical Role of Governance and Quality.pdfAI You Can Trust: The Critical Role of Governance and Quality.pdf
AI You Can Trust: The Critical Role of Governance and Quality.pdf
Precisely
 
How to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabberHow to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabber
eGrabber
 
Financial Services Technology Summit 2025
Financial Services Technology Summit 2025Financial Services Technology Summit 2025
Financial Services Technology Summit 2025
Ray Bugg
 
Q1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor PresentationQ1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor Presentation
Dropbox
 
The Future of Cisco Cloud Security: Innovations and AI Integration
The Future of Cisco Cloud Security: Innovations and AI IntegrationThe Future of Cisco Cloud Security: Innovations and AI Integration
The Future of Cisco Cloud Security: Innovations and AI Integration
Re-solution Data Ltd
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
UiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer OpportunitiesUiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer Opportunities
DianaGray10
 
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Raffi Khatchadourian
 
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPathCommunity
 
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
James Anderson
 
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make .pptx
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make   .pptxWebinar - Top 5 Backup Mistakes MSPs and Businesses Make   .pptx
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make .pptx
MSP360
 
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
SOFTTECHHUB
 
AsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API DesignAsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API Design
leonid54
 
fennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solutionfennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solution
shallal2
 
AI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of DocumentsAI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of Documents
UiPathCommunity
 
Play It Safe: Manage Security Risks - Google Certificate
Play It Safe: Manage Security Risks - Google CertificatePlay It Safe: Manage Security Risks - Google Certificate
Play It Safe: Manage Security Risks - Google Certificate
VICTOR MAESTRE RAMIREZ
 
Viam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdfViam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdf
camilalamoratta
 
Unlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web AppsUnlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web Apps
Maximiliano Firtman
 
AI You Can Trust: The Critical Role of Governance and Quality.pdf
AI You Can Trust: The Critical Role of Governance and Quality.pdfAI You Can Trust: The Critical Role of Governance and Quality.pdf
AI You Can Trust: The Critical Role of Governance and Quality.pdf
Precisely
 
How to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabberHow to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabber
eGrabber
 
Financial Services Technology Summit 2025
Financial Services Technology Summit 2025Financial Services Technology Summit 2025
Financial Services Technology Summit 2025
Ray Bugg
 
Q1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor PresentationQ1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor Presentation
Dropbox
 
The Future of Cisco Cloud Security: Innovations and AI Integration
The Future of Cisco Cloud Security: Innovations and AI IntegrationThe Future of Cisco Cloud Security: Innovations and AI Integration
The Future of Cisco Cloud Security: Innovations and AI Integration
Re-solution Data Ltd
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
UiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer OpportunitiesUiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer Opportunities
DianaGray10
 
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Raffi Khatchadourian
 
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPathCommunity
 
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
James Anderson
 

Using jQuery to Maximize Form Usability

  • 1. SPTechCon San Fransicso 2014 Using jQuery to Maximize SharePoint Form Usability Mark.Rackley@capSpire.com April, Twenty Fourteen
  • 2. Mark Rackley / Senior Consultant • 19+ years software architecture and development experience • SharePoint Junkie since 2007 • Event Organizer • Blogger, Writer, Speaker • Bacon aficionado @mrackley www.SharePointHillbilly.com www.MarkRackley.net www.SharePointaLooza.org
  • 3. Agenda • What’s and Why’s • The Basics • Automatic Parent / Child relationship • Showing / Hiding Fields • Custom field validation • Using REST for cascading drop down lists • Improving form layout using HTML Templates
  • 4. What Exactly Are We Going To Be Doing? Create powerful dynamic forms Create visually appealing forms Use HTML, JavaScript Utilize existing default New and Edit Forms
  • 5. Why Are We Doing This? Default SharePoint Forms are ugly Default SharePoint Forms aren’t dynamic Creating new forms from scratch is time consuming and cumbersome InfoPath is not the right approach for many scenarios (and it’s going away yay!)
  • 6. What Skills Do I Need? HTML / CSS  Create Pretty forms JavaScript / jQuery  Create dynamic forms REST / CSOM / SPServices  Create powerful forms
  • 7. The Basis Create a script and place it in a Document Library Edit the Default New or Edit Form for a List/Library Add a Content Editor Web Part to the default form Link Script to the Content Editor Web Part
  • 8. The Basics – Editing the Default Form From a list view on the ribbon, click on the “List” tab Click on the “Modify Form Web Parts” button and select the form to edit.
  • 9. The Basics – Identifying Form Elements Use the “title” attribute when possible to retrieve a field  <select title="City" id="City_310b7c27-13ba-4a7e- a133-058d312a6b7f_$LookupField">  $(“select*title=‘City’+”);  Be careful of DOM changes (ie “Required Fields)  <select title="City Required Field" id="City_310b7c27- 13ba-4a7e-a133-058d312a6b7f_$LookupField">
  • 10. The Basics – Identifying Form Elements Use the “FieldName” or “FieldInternalName” stored in the comments if necessary  <td width="350" class="ms-formbody" valign="top"> <!-- FieldName="City" FieldInternalName="City" FieldType="SPFieldLookup“ -->  $("table.ms-formtable td").each(function(){ if (this.innerHTML.indexOf('FieldName=“City"') != -1) { var field = this; } });
  • 11. The Basic – Interacting with basic form fields //get input / select values $(“select*title=‘City’+”).val(); //set input / select values $(“select*title=‘City’+”).val(“value”); //uncheck a check box $(“input*title=‘City’+").removeAttr('checked'); //check a check box $(“input*title=‘City’+").attr('checked','checked'); //is a check box checked? if ($(“input*title=‘City’+”).is(':checked'))
  • 12. Showing / Hiding Fields Show/Hide the field’s entire row to ensure the label is not visible  $(“select*title=‘City’+”).closest(“tr”).hide(); Attach to click event of field to trigger showing/hiding  $(“input*title=‘myCheckbox’+”).click(function() { if ($(this).is(‘:checked’)) { hide or show fields } });
  • 13. Demo: Add jQuery to default form and learn how to identify elements
  • 14. Demo: Automatic Parent / Child List Relationship
  • 15. Demo: Showing / Hiding fields when a check box is checked
  • 16. Demo: Custom Field Validation
  • 17. Demo: Using REST for Cascading Drop Down Lists
  • 18. Demo: Improving Form Layout using HTML Templates