> For the complete documentation index, see [llms.txt](https://synoint.gitbook.io/survey-library/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://synoint.gitbook.io/survey-library/getting-started.md).

# Getting started

The <mark style="color:blue;">Survey Library</mark> is intended to be a temporary solution for most of the common use cases where a <mark style="color:blue;">Survey</mark> functionality is needed.&#x20;

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 <mark style="color:blue;">Javascript Library</mark> and <mark style="color:blue;">Syno Survey</mark>.

For now, just copy and paste this into the <mark style="background-color:orange;">Javascript editor</mark> just in the pages you want to use a functionality.

{% tabs %}
{% tab title="Initial template" %}

<pre class="language-javascript" data-line-numbers data-full-width="false"><code class="lang-javascript">// Insert the Library URLs enclosed by quotes and separated by commas
let scripts = [
<strong>  "Paste a single Library URL here"
</strong>];

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 */
<strong>    
</strong><strong>
</strong>    /* 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}`);
  });
</code></pre>

{% endtab %}
{% endtabs %}

The available list of Library URLs can be found below:

<table data-full-width="false"><thead><tr><th>Question type</th><th>Library URL</th></tr></thead><tbody><tr><td><mark style="color:blue;">Single choice</mark></td><td></td></tr><tr><td><mark style="color:blue;">Multiple choice</mark></td><td></td></tr><tr><td><mark style="color:blue;">Open text</mark></td><td></td></tr><tr><td><mark style="color:blue;">Single choice matrix</mark></td><td></td></tr><tr><td><mark style="color:blue;">Multiple choice matrix</mark></td><td></td></tr><tr><td><mark style="color:blue;">Rank</mark></td><td></td></tr></tbody></table>
