<img height="1" width="1" src="https://www.facebook.com/tr?id=730305433807073&amp;ev=PageView &amp;noscript=1">
Start
Book a Demo

Dynamic Forms - Part 1: Creating dynamic SharePoint form and field behaviors with skybow Solution Accelerators.

avatar

Posted by Adis Jugo - 28 July, 2016

A few days ago, while running a training program for a partner company, we came up with a requirement for dynamically setting SharePoint field values in the “New” and “Edit item” SharePoint forms. Every SharePoint developer comes across this sooner or later, because customers often want a form’s behavior extended beyond the standard SharePoint functionality.

Skybow can help! Using some JavaScript magic and SharePoint field values, we can easily set dynamic values on the SharePoint “New” and “Edit” forms’ fields in just a matter of minutes.

Let’s imagine the following scenario: we’ve come back from a SharePoint conference, and we have a list of leads that need to be categorized and consolidated. We create a very simple SharePoint list that might be, but does not have to be, part of a skybow case file. The list contains the following fields:

 

dynamics_01_liststructure.png

 

As you can see, for each lead, standard CRM values like Phone Number, Company, Position in company, Industry (lookup to the “Industries” SharePoint list), Subindustry (with its own lookup field to the “Industries” list), and Lead category (A – premium lead to C – loose lead) have to be set. 

The standard SharePoint “Add” or “Edit” form would look like this:

dynamics_02_plainform.png

Our requirements are as follows:

1. It should to be possible to add a new industry and subindustry directly from the leads form without navigating to those respective lists, and therefore losing the context.

2. If the field “Company” is filled in, the fields “Position” and “Industry” have to be enabled (by default, they should be disabled).

3. If “Industry” is selected, the field “Subindustry” has to be visible and marked as a required field; otherwise the field should not be visible (and therefore also not required).

4. Subindustry always has to be limited to the selected Industry.

5. If industry is set to “Information Technology,” the choices in the field “Category” have to be limited to “A – Premium lead” – or leads from that selected industry are premium leads. 

6. If the field “Position” contains the phrase “CEO,” automatically set the “Category” field to “A – Premium lead”

As you can see, those are some standard requirements that can be expected in pretty much every SharePoint business solution. So, let’s start. Our goal is to get this running in less than 15 minutes.

 

Rich Forms eBook


Recent Posts

Creating Your First Solution with skybow: What to Keep in Mind

read more

The 3 Pillar of a successful workspace: Intranet, Collaboration, and Business Apps

read more

SharePoint-based business apps: high-performance, good looking and responsive? Sure!

read more