Page cover image

πŸš€Getting started

The initial configuration to make use of the Survey Library

The Survey Library is intended to be a temporary solution for most of the common use cases where a Survey functionality is needed.

This knowledge base is divided in sections of interest (SOI) where the reader can find a widely used pre-configured templates.

Before getting started you will always need to use this template in order to make use of all codes in this Library. Currently, there is not an native integration between this Javascript Library and Syno Survey.

For now, just copy and paste this into the Javascript editor just in the pages you want to use a functionality.

// Insert the Library URLs enclosed by quotes and separated by commas
let scripts = [
  "Paste a single Library URL here"
];

let promises = scripts.map((script) => {
  return new Promise((resolve, reject) => {
    document.querySelector("body").style.opacity = "0";
    let s = document.createElement("script");
    s.src = script;
    s.onload = resolve;
    s.onerror = reject;
    document.head.appendChild(s);
  });
});

Promise.all(promises)
  .then(() => {
    /* All scripts are loaded, you can execute your functions here */
    

    /* All script ends here */
    document.querySelector("body").style.opacity = "1";
  })
  /* If a library could not be imported throw an error */
  .catch((error) => {
    console.error(`Failed to load script: ${error}`);
  });

The available list of Library URLs can be found below:

Question type
Library URL

Single choice

Multiple choice

Open text

Single choice matrix

Multiple choice matrix

Rank

Last updated

Was this helpful?