Progress bar in certain areas | XM Community
Solved

Progress bar in certain areas

  • 1 August 2023
  • 4 replies
  • 45 views

Userlevel 2
Badge +2

Is it possible to add a progress bar for specific sections of a survey (e.g. progress bar for beginning of survey, progress bar for last part of survey separately) or does it have to be the entire experience?

icon

Best answer by TomG 2 August 2023, 15:29

View original

4 replies

Userlevel 7
Badge +27

You can add your own progress bar using a html <progress> tag and either pipe the value or set the value with JavaScript.

Userlevel 2
Badge +2

Do you know how the piping or JavaScript options would work?

Userlevel 7
Badge +27

Do you know how the piping or JavaScript options would work?

For piping, if you had an embedded data field ‘percent’ that contained the percentage, you would do this:

<progress id="pbar" style="width:100%" value="${e://Field/percent}" max="100">

To set the value with JavaScript, you would do something like this:

var percent = 50;
jQuery("#pbar").val(percent);

 

Userlevel 4
Badge +12

simple and to the point solution TomG, really like this one.

Leave a Reply