Using classes/static properties from the header. | XM Community
Skip to main content

Using classes/static properties from the header.

  • January 12, 2022
  • 0 replies
  • 8 views

Forum|alt.badge.img+1

Hi all,
My survey's header contains a couple of custom classes and helper functions that I intend to use throughout the survey. I am able to access the helpers from (any) question's addOnload(), but when I try accessing classes I get a reference error.
I have reduced it to the following minimum sample. Can someone please help me figure out what's going on?
Header:


Question:
Qualtrics.SurveyEngine.addOnload(function(){

    myFunc(); // Outputs "Hi from myFunc!" on console

    ED.getValue(); //Produces 
ReferenceError
: ED is not defined

});