<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 3: Enabling the "Position" and "Industry" fields based on other values.

avatar

Posted by Adis Jugo - 11 August, 2016

For now, all of the fields on the “Add new” and “Edit” SharePoint list forms are enabled and visible. But, the requirement was that the “Position” and “Industry” fields are only enabled if the field “Company” has been entered. Field “Subindustry” should not be visible at all, if the field “Industry” has not been selected.

Let’s go back to the skybow Solution Studio, and make those changes.

With the fields “Position” and “Industry” in the “Attributes” section, we will change the “Enabled” expression to

[[Company]] != “”

This will make those fields enabled only if the value of the field “Company” is not an empty string. Note the skybow Solution Accelerators expressions notation here – double square brackets denote placeholders for the field names, from current or related lists. In this case, since those are dynamic expressions, we will use JavaScript in combination with skybow placeholders to determine whether the “Company” field is empty, and if not, enable the two fields from our requirement:


 

dynamics_07_enabled.png

 Setting enabled expression for the Position field.

 

For the Visible Expression in the Subindustry field, we will, for now, just enter “false” – this will make the “Subindustry” field invisible no matter which values we enter into other fields.

 

dynamics_08_visible.png

 

Setting visible expression of the Subindustry field to false.

 

After saving this configuration, and opening the “Leads” list item in either the “Add new” or “Edit” form, we will see that “Subindustry” is not visible at all, and that the “Industry” and “Position” fields are enabled only if the field “Company” is entered.

 

 

dynamics_09_conditionalenabled.gif

Behavior of Position and Industry fields based on the other fields values

 

You want to read the whole story? Click here to get the eBook!

Rich Forms eBook


Recent Posts

There Is a Lot Going on With Our New Partner Axians…

read more

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