SlideShare ist ein Scribd-Unternehmen logo
1 von 19
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

Weitere ähnliche Inhalte

Was ist angesagt?

#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 ServicesMark Rackley
 
(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery GuideMark 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 SharePointMark Rackley
 
SharePoint & jQuery Guide - SPSNashville 2014
SharePoint & jQuery Guide - SPSNashville 2014SharePoint & jQuery Guide - SPSNashville 2014
SharePoint & jQuery Guide - SPSNashville 2014Mark Rackley
 
Introduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointIntroduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointRene 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 JavaScriptJohn Calvert
 
SPSNH 2014 - The SharePoint & jQueryGuide
SPSNH 2014 - The SharePoint & jQueryGuideSPSNH 2014 - The SharePoint & jQueryGuide
SPSNH 2014 - The SharePoint & jQueryGuideMark Rackley
 
SharePoint REST vs CSOM
SharePoint REST vs CSOMSharePoint REST vs CSOM
SharePoint REST vs CSOMMark 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 CSSJohn 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 WorkshopMark Rackley
 
Content by query web part
Content by query web partContent by query web part
Content by query web partIslamKhattab
 
SharePoint 2013 Client Side Rendering
SharePoint 2013 Client Side RenderingSharePoint 2013 Client Side Rendering
SharePoint 2013 Client Side RenderingBill 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 ITProsPaul 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 knownMark 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 SPSTCJohn Ross
 
SEF2013 - A jQuery Primer for SharePoint
SEF2013 - A jQuery Primer for SharePointSEF2013 - A jQuery Primer for SharePoint
SEF2013 - A jQuery Primer for SharePointMarc 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 RenderingRiwut Libinuko
 
Using js link and display templates
Using js link and display templatesUsing js link and display templates
Using js link and display templatesPaul Hunt
 

Was ist angesagt? (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...
 
Intro to SharePoint Web Services
Intro to SharePoint Web ServicesIntro to SharePoint Web Services
Intro to SharePoint Web Services
 
(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide
 
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
 
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
 
SharePoint & jQuery Guide - SPSNashville 2014
SharePoint & jQuery Guide - SPSNashville 2014SharePoint & jQuery Guide - SPSNashville 2014
SharePoint & jQuery Guide - SPSNashville 2014
 
Introduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointIntroduction to using jQuery with SharePoint
Introduction to using jQuery with SharePoint
 
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
 
SPSNH 2014 - The SharePoint & jQueryGuide
SPSNH 2014 - The SharePoint & jQueryGuideSPSNH 2014 - The SharePoint & jQueryGuide
SPSNH 2014 - The SharePoint & jQueryGuide
 
SharePoint REST vs CSOM
SharePoint REST vs CSOMSharePoint REST vs CSOM
SharePoint REST vs CSOM
 
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
 
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
 
Content by query web part
Content by query web partContent by query web part
Content by query web part
 
SharePoint 2013 Client Side Rendering
SharePoint 2013 Client Side RenderingSharePoint 2013 Client Side Rendering
SharePoint 2013 Client Side Rendering
 
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
 
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
 
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
 
SEF2013 - A jQuery Primer for SharePoint
SEF2013 - A jQuery Primer for SharePointSEF2013 - A jQuery Primer for SharePoint
SEF2013 - A jQuery Primer for SharePoint
 
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
 
Using js link and display templates
Using js link and display templatesUsing js link and display templates
Using js link and display templates
 

Ähnlich wie Using jQuery to Maximize Form Usability

Quick & Easy SharePoint Forms with StratusForms
Quick & Easy SharePoint Forms with StratusFormsQuick & Easy SharePoint Forms with StratusForms
Quick & Easy SharePoint Forms with StratusFormsApril Dunnam
 
The SharePoint & jQuery Guide
The SharePoint & jQuery GuideThe SharePoint & jQuery Guide
The SharePoint & jQuery GuideMark 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 - SPTechConSPTechCon
 
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 APIScott 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 InitiationEric Overfield
 
Intro to InfoPath Workflow
Intro to InfoPath WorkflowIntro to InfoPath Workflow
Intro to InfoPath WorkflowNikkia Carter
 
Designing SharePoint 2010 for Business
Designing SharePoint 2010 for BusinessDesigning SharePoint 2010 for Business
Designing SharePoint 2010 for BusinessKanwal 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 365Joanne Klein
 
Share Point
Share PointShare Point
Share Pointjimbelo
 
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 2013Kiril Iliev
 
Column Formatter in SharePoint Online
Column Formatter in SharePoint OnlineColumn Formatter in SharePoint Online
Column Formatter in SharePoint OnlineMark 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 DesignerPatrick O'Toole
 
SharePoint and jQuery Essentials
SharePoint and jQuery EssentialsSharePoint and jQuery Essentials
SharePoint and jQuery EssentialsMark 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 2019Nikkia Carter
 
SPSTC - SharePoint & jQuery Essentials
SPSTC - SharePoint & jQuery EssentialsSPSTC - SharePoint & jQuery Essentials
SPSTC - SharePoint & jQuery EssentialsMark 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 ProsPaul Hunt
 
Spsbe using js-linkanddisplaytemplates
Spsbe   using js-linkanddisplaytemplatesSpsbe   using js-linkanddisplaytemplates
Spsbe using js-linkanddisplaytemplatesPaul 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 descrptionPrashant Kumar Singh
 

Ähnlich wie 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
 
The SharePoint & jQuery Guide
The SharePoint & jQuery GuideThe SharePoint & jQuery Guide
The SharePoint & jQuery Guide
 
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
 
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
 
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)
 
Your SharePoint 2013 Branding Initiation
Your SharePoint 2013 Branding InitiationYour SharePoint 2013 Branding Initiation
Your SharePoint 2013 Branding Initiation
 
Intro to InfoPath Workflow
Intro to InfoPath WorkflowIntro to InfoPath Workflow
Intro to InfoPath Workflow
 
Designing SharePoint 2010 for Business
Designing SharePoint 2010 for BusinessDesigning SharePoint 2010 for Business
Designing SharePoint 2010 for Business
 
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
 
Share Point
Share PointShare Point
Share Point
 
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
 
Column Formatter in SharePoint Online
Column Formatter in SharePoint OnlineColumn Formatter in SharePoint Online
Column Formatter in SharePoint Online
 
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
 
SharePoint and jQuery Essentials
SharePoint and jQuery EssentialsSharePoint and jQuery Essentials
SharePoint and jQuery Essentials
 
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...
 
PowerApps vs InfoPath - SPSVB 2019
PowerApps vs InfoPath - SPSVB 2019PowerApps vs InfoPath - SPSVB 2019
PowerApps vs InfoPath - SPSVB 2019
 
SPSTC - SharePoint & jQuery Essentials
SPSTC - SharePoint & jQuery EssentialsSPSTC - SharePoint & jQuery Essentials
SPSTC - SharePoint & jQuery Essentials
 
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
 
Spsbe using js-linkanddisplaytemplates
Spsbe   using js-linkanddisplaytemplatesSpsbe   using js-linkanddisplaytemplates
Spsbe using js-linkanddisplaytemplates
 
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
 

Mehr von 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 SPFXMark 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 SharePointMark 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 FasterMark 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 SharePointMark 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 SharePointMark 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 itMark 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 essentialsMark Rackley
 

Mehr von 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
 
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
 
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
 
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
 
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
 
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
 
What is SharePoint Development??
What is SharePoint Development??What is SharePoint Development??
What is SharePoint Development??
 
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)
 
What IS SharePoint Development?
What IS SharePoint Development?What IS SharePoint Development?
What IS SharePoint Development?
 
SharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentialsSharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentials
 

Kürzlich hochgeladen

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Kürzlich hochgeladen (20)

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

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