Scripting - Validation Scripting, Perl

Custom validation scripting code can be inserted to the Validation script box to prevent users from continuing, deciding what page to jump to, and for advanced question validation. The Validation script box is located on the right side of the screen when you select a Section break object. Press the JS/Perl button to toggle between JavaScript style and Perl style syntax. You can also view the Validation script box from the Validation tab of the advanced question options for Section break objects.

Custom JavaScript validation code is used in combination with the compiled CGIs. Custom Perl validation code is used in combination with the Perl CGIs.

All of the custom validation scripting code should be put into the projectname.val file.


The Perl validation code has standard Perl syntax. All of the variables from the Perl .pl file can be access from within the .val file.


if ($_PAGEWARN eq '') { if ($_PAGESKIP eq '' && $_PAGENEXT eq '') {&ShowPage('pageq2');}}

if ($FORM{'Q1'} eq '1') {&ShowPage('pageq2');}

See also...