Tutorial JavaScript: Switching panels using a radio button



Similar documents
Tutorial- Create a cascading drop-down control

Nintex Forms 2013 Help

Dynamic Forms for SharePoint

Product Guide Nintex. All rights reserved. Errors and omissions excepted.

ProperSync 1.3 User Manual. Rev 1.2

Table of Contents. 1. Content Approval...1 EVALUATION COPY

Microsoft SharePoint 2010 End User Quick Reference Card

Export the address book from the Blackberry handheld to MS Outlook 2003, using the synchronize utility in Blackberry Desktop Manager.

ITCS QUICK REFERENCE GUIDE: EXPRESSION WEB SITE

Learn how to create web enabled (browser) forms in InfoPath 2013 and publish them in SharePoint InfoPath 2013 Web Enabled (Browser) forms

The Smart Forms Web Part allows you to quickly add new forms to SharePoint pages, here s how:

Step-By-Step build Advanced InfoPath Form and SharePoint Designer Workflow

USING STUFFIT DELUXE THE STUFFIT START PAGE CREATING ARCHIVES (COMPRESSED FILES)

UF Health SharePoint 2010 Introduction to Content Administration

1. Click the Site Actions dropdown arrow and select Show Page Editing Toolbar. 2. Click Edit Page to begin changing the page layout

Getting started with 2c8 plugin for Microsoft Sharepoint Server 2010

QUANTIFY INSTALLATION GUIDE

How schedule AccuTRConsole to run every hour

Introduction: The Xcode templates are not available in Cordova or above, so we'll use the previous version, for this recipe.

Colligo Contributor File Manager 4.6. User Guide

Student Records Home Page

Sharepoint Manual for the Joint Action on Health Workforce Planning and Forecasting

SP Term Cloud Installation

SPHOL326: Designing a SharePoint 2013 Site. Hands-On Lab. Lab Manual

Lab - Configure a Windows 7 Firewall

Configuring Your Firewall for Client Access in Professional Edition

Tutorial: How to start a workflow with the Call Web Service action

Nintex Workflow 2010 Installation Guide. Installation Guide Nintex USA LLC, All rights reserved. Errors and omissions excepted.

EBOX Digital Content Management System (CMS) User Guide For Site Owners & Administrators

UOFL SHAREPOINT ADMINISTRATORS GUIDE

Microsoft Office 2010

Tutorial 3. Maintaining and Querying a Database

This tutorial provides detailed instructions to help you download and configure Internet Explorer 6.0 for use with Web Commerce application.

Getting Started with the Aloha Community Template for Salesforce Identity

PC Agent Quick Start. Open the Agent. Autonomy Connected Backup. Version 8.8. Revision 0

Conference Flow Chart

eadvantage Certificate Enrollment Procedures

ARCONICS CONTENT MANAGEMENT SYSTEM FOR UL

State of Illinois Web Content Management (WCM) Guide For SharePoint 2010 Content Editors. 11/6/2014 State of Illinois Bill Seagle

Roth IRA Conversion Evaluator

Guide to Automating Workflows Quickly and Easily

Title: SharePoint Advanced: Adding An Image to A Site Purpose Policy Definitions

Changing Your Cameleon Server IP

Site Maintenance Using Dreamweaver

How to Install CS OrthoTrac on a New Server and Copy the Data from the Old Server to the New Version 12 and higher

Adding a File Attachment to a CFS Requisition

WP Popup Magic User Guide

MTA Course: Windows Operating System Fundamentals Topic: Understand backup and recovery methods File name: 10753_WindowsOS_SA_6.

Kepware Technologies KEPServerEX Client Connectivity Guide for GE's Proficy ifix

Remote Storage Area (RSA) Basics

Working with SQL Server Integration Services

Shasta College SharePoint Tutorial. Create an HTML Form

To add files to your , first create the . When you have opened a new

Instructions for Configuring a SAS Metadata Server for Use with JMP Clinical

Virtual Office Remote Installation Guide

File Management Utility User Guide

In this lab you will explore the Windows XP Firewall and configure some advanced settings.

Create, Link, or Edit a GPO with Active Directory Users and Computers

Optional Lab: Schedule Task Using GUI and at Command in Windows 7

5.6.2 Optional Lab: Restore Points in Windows Vista

KFUPM. Web Content Management System powered by SharePoint

UF Health SharePoint 2010 Document Libraries

How To Send An Encrypted In Outlook 2000 (For A Password Protected ) On A Pc Or Macintosh (For An Ipo) On Pc Or Ipo (For Pc Or For A Password Saf ) On An Iphone Or

SharePoint How To s / Team Sites 1of 6

Team Foundation Server 2012 Installation Guide

Quick Start Guide Mobile Entrée 4

How to Build a SharePoint Website

Subscribe to RSS in Outlook Find RSS Feeds. Exchange Outlook 2007 How To s / RSS Feeds 1of 7

Troubleshooting Guide

Managing Contacts in Outlook

Colligo Manager 5.1. User Guide

Lab A: Deploying and Managing Software by Using Group Policy Answer Key

Lab - Configure a Windows XP Firewall

Magaya Software Installation Guide

Printer Sharing of the PT-9500pc in a Windows Environment

Dreamweaver Tutorial - Dreamweaver Interface

6. If you want to enter specific formats, click the Format Tab to auto format the information that is entered into the field.

Configuring Network Load Balancing with Cerberus FTP Server

SAS Task Manager 2.2. User s Guide. SAS Documentation

TAMUS Terminal Server Setup BPP SQL/Alva

Vizit 4.1 Installation Guide

SharePoint Online Quick Reference

BSDI Advanced Fitness & Wellness Software

BUILDING A CLASSROOM

Product Guide Nintex. All rights reserved. Errors and omissions excepted.

MAS 500 Intelligence Tips and Tricks Booklet Vol. 1

INTRODUCTION 5 COLLABORATION RIBBON 5 SELECT THE UPDATING METHOD 6 MAKE YOUR PROJECT COLLABORATIVE 8 PROCESSING RECEIVED TASK UPDATES 9

Config Guide. Gimmal Smart Tiles (SharePoint-Hosted) Software Release 4.4.0

MadCap Software. SharePoint Guide. Flare 11.1

Business Objects Enterprise version 4.1. Report Viewing

SPHOL213: Intro to Web Content Management in SharePoint 2013

Video Administration Backup and Restore Procedures

1. CONFIGURING REMOTE ACCESS TO SQL SERVER EXPRESS

Quick Start Guide. Installation and Setup

How to Configure Outlook Client for Exchange

Colligo Manager 6.0. Offline Mode - User Guide

SPELL Tabs Evaluation Version

Transcription:

Tutorial JavaScript: Switching panels using a radio button www.nintex.com support@nintex.com

Contents About this tutorial... 3 Upload the JavaScript File... 4 Using JavaScript to hide or show a control based on the selection of a radio button... 6 Configure Form Settings... 7 Configure the Panel Controls... 9 Configure the Choice control... 11 www.nintex.com support@nintex.com 2 13 2012 Nintex USA LLC, All rights reserved

About this tutorial The following tutorial will demonstrate how to hide or show controls using JavaScript. The tutorial will describe how to: Include a custom JavaScript file that the Nintex form can reference and use the functions within the form. Configure a radio button control to display a selected panel. This tutorial assumes that the user has a basic knowledge of designing forms with Nintex Forms 2010. If not, please refer to the following tutorials for more information: a) Designing a Nintex Workflow Start Form b) Designing a List Form www.nintex.com support@nintex.com 3 13 2012 Nintex USA LLC, All rights reserved

Upload the JavaScript File For the purpose of this tutorial, we have provided a JavaScript file. Please find the JavaScript file here: http://nintexdownload.com/sl/supportfiles/conditionaldisplayofcontrol.zip. The JavaScript file will be uploaded to SharePoint so that it can be referenced within the Nintex form s settings. Note: If the form is to be published to Nintex Live, please upload the JavaScript file to a publically accessible location or include the contents of the file directly in the custom JavaScript section in Form Settings. 1. Navigate to Site Actions in the same site that the form is to be designed and select View All Site Content. 2. In the Document Libraries section, select Style Library. www.nintex.com support@nintex.com 4 13 2012 Nintex USA LLC, All rights reserved

3. In the Style Library, click Add document. 4. In the Upload Document dialog, select Browse and locate the provided JavaScript file. Click OK. The JavaScript file has now been uploaded and can be used for the tutorial. www.nintex.com support@nintex.com 5 13 2012 Nintex USA LLC, All rights reserved

Using JavaScript to hide or show a control based on the selection of a radio button As an example, the Customer Survey form below will be used to demonstrate the use of JavaScript and radio buttons to display a specific panel based on the selection of the radio button. Once all the customizations for the form have been completed, different panels will display based on the radio button selected. In the example below, ABC Clothing has been selected and the question relevant to that company is displayed. A different question would be visible to the user, if DEF Shoes or GHI Homewares were selected. Note: To hide a section of the form, use the Panel control to group the relevant controls together. For more information, refer to the Panel control. www.nintex.com support@nintex.com 6 13 2012 Nintex USA LLC, All rights reserved

Configure Form Settings Before we configure the individual controls, we need to configure the form s settings to include the JavaScript to be used with the form. The JavaScript file contains the function to hide and show a control. The JavaScript function defined in the file will then be used in the form s Custom JavaScript setting. 1. In the Nintex Forms 2010 Ribbon, click on the Settings button. 2. Click on the Advanced section. 3. In the Custom JavaScript Includes field, enter the following JavaScript file: /Style%20Library/ConditionalDisplayOfControl.js Note: If publishing to Nintex Live, the JavaScript file must be an absolute URL and publically accessible or its content included directly in the Custom JavaScript section below. www.nintex.com support@nintex.com 7 13 2012 Nintex USA LLC, All rights reserved

4. Click on the Custom JavaScript textbox, type the following JavaScript syntax: NWF$(document).ready(function() { EnableConditionControlOnView(PanelToShow); DisplayControlConditionally(.panel1, PanelToShow, 1); DisplayControlConditionally(.panel2, PanelToShow, 2); DisplayControlConditionally(.panel3, PanelToShow, 3); }); The EnableConditionControlOnView is used to enable the radio buttons when in display mode. Otherwise they would be disabled and not available as navigation in display mode. The parameter it is provided is a JavaScript variable containing the client id of the Radio Button control. The other JavaScript function sets up the show and hide of the relative panel. The first parameter is a JQuery selector to find the panel you want to hide or show. The second parameter is a JavaScript variable containing the client id of the radio buttons or control you want to trigger the hide or show from. The last parameter is the value returned from the radio buttons in order to show the selected panel. www.nintex.com support@nintex.com 8 13 2012 Nintex USA LLC, All rights reserved

The next step is to configure the controls that will remain hidden unless a user selects the corresponding radio button. Configure the Panel Controls The panel controls will remain hidden unless the user selects the company that the panel section is connected to. Configure Panel Control for ABC Clothing (panel number one) The configurations below are to be completed for the panel control that is connected to the first radio button, ABC Clothing. 1. Double-click on the Panel control or right-click on the control and click Settings. 2. Click on the Appearance section. 3. In the CSS class field, type panel1. 4. Click Save. Configure Panel Control for DEF Shoes (panel number two) The configurations below are to be completed for the panel control that is connected to the second radio button, DEF Shoes. 1. Double-click on the Panel control or right-click on the control and click Settings. 2. Click on the Appearance section. 3. In the CSS class field, type panel2. www.nintex.com support@nintex.com 9 13 2012 Nintex USA LLC, All rights reserved

4. Click Save. Configure Panel Control for GHI Homewares (panel number three) The configurations below are to be completed for the panel control that is connected to the third radio button, GHI Homewares. 1. Double-click on the Panel control or right-click on the control and click Settings. 2. Click on the Appearance section. 3. In the CSS class, type panel3. www.nintex.com support@nintex.com 10 13 2012 Nintex USA LLC, All rights reserved

4. Click Save. Note: Although the panel controls are displayed when designing the form; during run time, the specific panel control will only appear when the corresponding radio button is selected. Configure the Choice control The next step is to configure the control that determines which hidden panel control is shown in runtime. A variable must be entered which stores the Client ID. The JavaScript will then reference this variable. The Which company did you visit? Choice control will determine which panel control will be shown in runtime. Once a user selects one of the Company radio buttons, the hidden panel connected to that company will be visible to the user. 1. Double-click on the Choice control or right-click on the control and click Settings. Please Note: The Choices are already generated in this control. The JavaScript 2. Click on the Advanced section. 3. In the Store Client ID in JavaScript variable menu, select Yes. www.nintex.com support@nintex.com 11 13 2012 Nintex USA LLC, All rights reserved

4. In the Client ID JavaScript variable name box, type PanelToShow. www.nintex.com support@nintex.com 12 13 2012 Nintex USA LLC, All rights reserved

The form is now ready to use. Next Steps If you created tabs using JQuery that updated a hidden radio button control this would give you multi page or tab functionality in your form. www.nintex.com support@nintex.com 13 13 2012 Nintex USA LLC, All rights reserved