Custom fields validation



Similar documents
Creating a folder in a library and submitting a form

How-To: Submitting PDF forms to SharePoint from custom websites

Qualtrics Question API

Student Records Home Page

Tutorial JavaScript: Switching panels using a radio button

Reports and Documents Generator for SharePoint ver.: 2.2

TIBCO ActiveMatrix BPM - Integration with Content Management Systems

How To Use Redcap

COMPANIES REGISTRY. Third Party Software Interface Specification. (Part 1 Overview)

ProactiveWatch 2.0 Patch Management and Reporting

WebSphere Business Monitor V7.0 Script adapter lab

ACORD Forms Notification Service May 2014 Bulletin

Tutorial: Building a Dojo Application using IBM Rational Application Developer Loan Payment Calculator

HTML Form Widgets. Review: HTML Forms. Review: CGI Programs

Using ilove SharePoint Web Services Workflow Action

Creating a Resource Library

Tutorial on Operations on Database using JDeveloper

Step by Step. Use the Cloud Login Website

FedTraveler.com. Log o FedTraveler.com using your valid Member ID and PIN.

SAP" Interactive Forms by Adobe*

StreamServe Persuasion SP5 Ad Hoc Correspondence and Correspondence Reviewer

Managing Payment Information

Form And List. SuperUsers. Configuring Moderation & Feedback Management Setti. Troubleshooting: Feedback Doesn't Send

The IT Service Desk is now able to offer a new self-service facility for University staff and students.

DocuSign for SharePoint

CLARIION PERFORMANCE MONITORING SCRIPTING GUEST HOME PDF

Vizit 4.1 Installation Guide

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

Installing and Sending with DocuSign for NetSuite v2.2

Data Management Applications with Drupal as Your Framework

When you publish data to a SharePoint site, you first

Polling Banner Known Issues Implementing the Block Configuring in Flash... 3 AS AS3... 8

New and Improved DocuSign Signing Experience Information Guide

Contact Management. All Records This query returns all records in the project with the contact ID, flag status, first name, and last name.

MASTERTAG DEVELOPER GUIDE

Kaldeera Workflow Designer 2010 User's Guide

Setting up Microsoft Outlook to reject unsolicited (UCE or Spam )

Virto Password Reset Web Part for SharePoint. Release Installation and User Guide

Managing Food Service Payment Information

Deployment Guide. AX Series with Microsoft Office SharePoint Server

Adobe Certified Expert Program

HarePoint Analytics. For SharePoint. Administrator Guide

Komumaldata Barcoded PDF Forms PDF417 Barcode Generator Reference XFA (LiveCycle) Version Generator Version: 1.12

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

SharePoint List Filter Favorites Installation Instruction

Document Creation Automation Using SharePoint Designer Workflows

Adobe Acrobat: Creating Interactive Forms

Go to Tools General Ledger Setup Ledger Codes and Tab 5: Ledger Codes

Scanning Documents into OneSite The Preiss Company

CRM Rules! User Guide. Version Prepared October, 2012 By: David L. Carr, President, Visionary Software

Introduction to Microsoft OneNote 2007

FORM-ORIENTED DATA ENTRY

ThorApp s. License Activation Guide. No nonsense tools, apps and add-ons for SharePoint. Author: Adrian Bear. Date: 22 Sep Version: 1.

Creating a Java application using Perfect Developer and the Java Develo...

HarePoint Workflow Extensions for Office 365. Quick Start Guide

Getting Started with SharePoint Three projects. Legislative Service Center (LSC) Homepage Employee Bulletin Board CMS to SharePoint Migration

JAVASCRIPT AND COOKIES

Nurse and Midwifery Career Long eportfolio summary guides: 1) Key functions: Getting started, logging on and moving around

WEB DESIGN COURSE CONTENT

DEPLOYMENT GUIDE Version 1.1. Deploying the BIG-IP LTM v10 with Citrix Presentation Server 4.5

Nifty web apps on an OpenResty

Installation & User Guide

Web Forms. Step One: Review Simple Contact Form

Get Started with LeadSquared Guide for Marketing Users. Complete lead to revenue platform

EFORMS MANUAL FOR SHAREPOINT ONLINE

ROCHESTER CITY SCHOOL DISTRICT Employee Comments and Acknowledgement of Performance Review

TIBCO ActiveMatrix BPM Integration with Content Management Systems Software Release September 2013

Using ShopTab with an Affiliate Marketing Program

FrontPage 2003: Forms

I don t intend to cover Python installation, please visit the Python web site for details.

Webforms on a Drupal 7 Website 3/20/15

Hands-On Lab. Client Workflow. Lab version: Last updated: 2/23/2011

MyReports Recommended Browser Settings MYR-200a

Colligo Briefcase Enterprise. Administrator s Guide

Visual Basic Programming. An Introduction

DATA SHEET Setup Tutorial

Designing and Implementing Forms 34

1 Classified Script. User Guide v1.0

Editor Manual for SharePoint Version December 2005

Microsoft SQL Server 2005 How to Create and Restore Database (GRANTH3) Manually

Custom Javascript In Planning

Technical Guide for Remote access

Form Management Admin Guide

Getting Started with Access 2007

INFOPATH FORMS FOR OUTLOOK, SHAREPOINT, OR THE WEB

STEVEN MANN. InfoPath* with. SharePoint HOW-TO. 800 East 96th Street, Indianapolis, Indiana USA

Instructions for accessing new online Research Degree Forms - Staff

Document Distributor 4.6. SDK Guide

Deploying Java 8 Runtime Environment using SyAM Management Utilities

ETHICS ONLINE TRAINING INFORMATION AND TIPS

Installation & User Guide

Transcription:

PDF SHARE FORMS Online, Offline, OnDemand Custom fields validation PDF Share Forms

This guide will show how to make custom validation for fields in static AcroForms and Dynamic XFA forms. 1. Static AcroForm Step 1. Template Following template will be used in this guide: In this template are used following controls: RegularButton1 as custom submit button; TextField2 as example for custom is not blank and validation; RadioButtonGroup4 as example for custom is not blank. Step 2. Add script to RegularButton1 (PDF Form Tools Properties Actions): Add JavaScript action. Code: var isblank = false; var blank = "Please fill following fields:"; var isnotvalid = false; var notvalid = "Please check input data in following fields:"; //cannot be blank if (this.getfield('textfield2').value == "") { blank = blank + "\n" + this.getfield('textfield2').name; if (this.getfield('radiobuttongroup4').value == "Off") { blank = blank + "\n" + this.getfield('radiobuttongroup4').name; 2

//validation text field must contain only lower case letters if (/^[a-z]*$/.test(this.getfield('textfield2').value) == false) { notvalid = notvalid + "\n" + this.getfield('textfield2').name; isnotvalid = true; //generate message var message = ""; if (isblank == true) { message = blank + "\n" + "\n"; if (isnotvalid == true) { message = message + notvalid; //check all conditions if ((isblank == true) (isnotvalid == true)) { //show message app.alert({ cmsg: message, ctitle: "Input data error" ); else { //save form eval("var sysdata ="+this.getfield("pdfspsystemdata").value); this.submitform({curl: (sysdata.weburl "")+"/_layouts/pdfforms/pdf.aspx", csubmitas: "PDF" ); This code will check if TextField2 or RadioButtonGroup4 are blank. Then it will validate data inside TextField2 using JavaScript Regular expressions field must contain only lower case letters. Finally it will create error message to display list of fields which are blank or need to be changed, or save this PDF form to SharePoint library. Step 3. Save template and deploy it to library Step 4. Runtime Step 4.1. Create new form and try to click on RegularButton1 when all fields are blank: 3

Step 4.2. Error message appeared. Close it; add to text field some wrong string with digits or upper case letters: Step 4.3. Close window again and fill all fields with right data: check one of radio buttons and text field with string containing only lower case letters: Now form can be submitted. 4

2. Dynamic XFA form Step 1. Template Following template will be used in this guide: In this template are used following controls: SubmitButton1 submit button with additional scripted conditions; DateTimeField1 as example for custom is not blank and validation; RadioButtonGroup1 as example for custom is not blank. Step 2. Add script to SubmitButton1 (PDF Form Tools Properties Button Click): Add Scripted condition condition to If section. Code: var isblank = false; var blank = "Please fill following fields:"; var isnotvalid = false; var notvalid = "Please check input data in following fields:"; //cannot be blank if (xfa.resolvenode("$data..datetimefield1").value == null) { blank = blank + "\n" + xfa.resolvenode("$data..datetimefield1").name; if (xfa.resolvenode("$data..radiobuttongroup1").value == null) { blank = blank + "\n" + xfa.resolvenode("$data..radiobuttongroup1").name; 5

//date time field validation - mm/dd/yyyy var rez = /^(0[1-9] 1[0-2])\/(0[1-9] 1\d 2\d 3[01])\/(19 20)\d{2$/.test(xfa.resolveNode("$data..DateTimeField1").value); if (rez == false) { notvalid = notvalid + "\n" + xfa.resolvenode("$data..datetimefield1").name; isnotvalid = true; //generate message var message = ""; if (isblank == true) { message = blank + "\n" + "\n"; if (isnotvalid == true) { message = message + notvalid; //check all conditions if ((isblank == true) (isnotvalid == true)){ //show message xfa.host.messagebox(message, "Input data error", 0); return false; else { //proceed to save action return true; This code will check if DateTimeField1 or RadioButtonGroup1 are blank. Then it will validate data inside DateTimeField1 using JavaScript Regular expressions field must contain data formatted as mm/dd/yyyy. Finally it will create error message to display list of fields which are blank or need to be changed, or save this PDF form to SharePoint library. Step 3. Save template and deploy it to library Step 4. Runtime Step 4.1. Create new form and try to click on Save when all fields are blank: 6

Step 4.2. Error message appeared. Close it, add to text field some wrong string date like 22/22/2013 : Step 4.3. Close window again and fill all fields with right data: check one of radio buttons and text field with string containing right date format: Now form can be submitted. 7