adding piped text in mouse overs/hovers | XM Community
Skip to main content

I have mouse overs /hovers in my survey in a) question texts and b) response options. Now, for some of these, the mouseover/tooltip text itself should be based on meta data of my particpants.

 

E.g. assume I’m doing an engagement survey and participants’ metadata has a data field called “business_unit” that stores, well, the business unit of each employee.

 

Now, I sometimes have question texts or response options like “How do you rate your business unit?” or “My business unit is XYZ”. So when the participant hovers over the word “business unit” I want show the business unit based on what is stored in the particpant’s meta data.

 

For the tool tip itself I was following this approach here: https://servicehub.ucdavis.edu/servicehub?id=ucd_kb_article&sysparm_article=KB0006562&spa=1&sys_id=c52ef409db10a4d098c6ac1b139619e7 and then in the survey for my specific question I’m going to the html view and was adding some code like: 

 

How do you rate your <span data-text="${e://Field/business_unit}" class="tooltip">business unit</span>?

where “${e://Field/business_unit}” is the respective reference to the meta data field.

Hi ​@MartinD ,

 

Have you tried using ‘title’ instead of ‘data-text’?

How do you rate your <span title="${e://Field/business_unit}" class="tooltip">business unit</span>?

 


@Chee Heng_SZ using this code works, thanks! However, it would display the meta data in the classical “tooltip” manner, i.e. this little yellow box that appears after a certain time.

 

Any idea how I could add it to my customized css code where I have customized a mouse over with a blue box (and other stuff) that immediately appears?


@Chee Heng_SZ nevermind...I noticed that the css code also uses the “data-text” thingy. So I changed it to “title” there as well, and now it’s showing the piped in meta data.


Leave a Reply