How to Add a Back Button Via JavaScript | XM Community
Solved

How to Add a Back Button Via JavaScript

  • 20 March 2019
  • 1 reply
  • 61 views

I currently have a survey that has a back button disappear when it reaches the block that I have a math operation in. Based on Qualtrics support, it seems like I would need to add javascipt to add a back button in.

Where and what would I put in to add a back button back into my survey for this block?

Thank you!
icon

Best answer by TomG 21 March 2019, 01:22

View original

1 reply

Userlevel 7
Badge +27
You can't add a back button back in. If you have any logic in the survey flow between blocks, then the back button goes away on the first page of the next block. The only way to avoid the disappearing back button is to avoid survey flow logic between blocks. This often isn't possible, but sometimes you can find alternatives to survey flow logic. For example, if the only logic between the blocks is a math operation, you can move the math operation into a question's JavaScript instead. For example:
```
Qualtrics.SurveyEngine.setEmbeddedData("mathResult", "$e{ 1 + 2 }");
```

Leave a Reply