Apply javascript code to all the pages

Anna_KebetsAnna_Kebets Barcelona, SpainCommunity Member Qubie ✭

Apply javascript code to all the pages

Hi!

Our company has several brands. We are using JS (+custom CSS) in order to show the survey in different color depending on which brand the client uses.

However, what I've noticed is that the code get applied only to the first page of the survey and when you move further, the color returns to the default.

Sometimes we might have 20-30 questions (each on a separate page). So pasting this code 20-30 times looks like a poor solution.

Is there any way to apply the code to the entire survey rather than only 1 page?

Tagged:

Best Answer

  • TomGTomG Raleigh, NCCommunity Member Wizard ✭✭✭✭✭
    Accepted Answer

    Place the JavaScript in the survey header inside a <script> tag.

Answers

  • Anna_KebetsAnna_Kebets Barcelona, SpainCommunity Member Qubie ✭

    Thanks a lot, @TomG !

    It works!

    I'll leave these instructions in case someone else runs into the same issue.

    In order to add it to the header:

    • Go to the Look&Feel
    • Select "General" and there click on "Edit" under the field saying "Header"
    • Click on the icon "<>" in the first row. And here you can add the tag <script>...</script> with your JS inside.


Sign In to Comment