The code and a working example of this method can be found in the documentation at https://script.surveygizmo.com/help/calculate-age
This gap in the SG scripting capability still doesn’t have a solution (or if there is one, I can’t find it). Basically, I need the ability to modify HTML on each page based on an answer to a question or URL variable passed in. Here’s a possible way for SG to provide this capability:
- Short PHP custom scripting, ascertain a URL variable value at the beginning of a survey
- assign the value of the URL variable to an persistent data object (PDO); PDO would be a new type of data the survey builder could add to the survey
- PHP (SG scripting) could make this easy since it runs server side. I could get the value of the URL variable.
- But, I need to be able to define a new object in SG called something like ‘Persistent Data Object’ and give it a name
- I could create a script in the <head> of each page that could manipulate the page based on the value of the persistent data. For example, I could modify the footer logo on each survey page to be the logo of the medical practice that’s passed in using a URL value.
What are the chances of getting something like this added?
thanks for the info