1

I am building a quiz using webforms and the computed data twig and have a question if something is possible and if there is documentation on how to build this.

The quiz is 20 questions and each answer has a value of 1-5, I have all of the computed data working and it is able to show the final score properly, but was wonder if I could assign a grade and give short text feedback based on the score.

For example:

A user scores less than 70 they would receive a grade of "Below Average", 70-80 Average and 81-100 "Above Average" and then some text giving them feedback on their score depending on this range they scored in. Is this possible to do in webforms?

1

Yes, this is possible. Computed elements can trigger condition logic. In your use case, you could hide/show a text field based on the score. You might need to trim the computed element's whitespace to get the condition to trigger properly

1
  • Thank you so much, this worked perfectly! Apr 21 at 21:42
2

I was able to solve it like that, I hope it helps you

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.