Tuesday, January 5, 2016

SurveyGizmo Custom Scripting

One nice feature of SurveyGizmo is their server-side custom scripting functionality (example below). It’s a PHP-like scripting language that allows you to modify the survey contents and operation at runtime. The script runs server-side before the page loads and offers a lot options for customizing a survey.

There are several things I would love to see with this feature:

  1. Syntax validation in the editor. Having to go through several survey pages to test your script and then find out you are missing a semi-colon or have a typo is no fun. A basic eval of the script would catch most of these errors.
  2. Using full PHP instead of PHP-lite. Having programmed a survey system I can understand why Survey Gizmo went with a more controlled subset of the language but when I need to use a function that isn’t there I’m not happy about it.
  3. Adding an option to run a script on page save. Currently, the scripts only run on page load so custom logic, validation and other items need to be on the next page. Sometimes it would be nice to just have them on the same page.

Having said that all in all its still pretty powerful functionality that we use with a lot of surveys at Researchscape.

Example of mapping the state question to another question that tracks the four main US Census regions.

No comments: