Skip to main content
therealandreas
Participant
October 15, 2019
Answered

Doing math on user input and displaying

  • October 15, 2019
  • 1 reply
  • 377 views

My company is considering Captivate for some of our existing customers, but also to cater to potential new customers. What I mean is that we would like a potential customer to log into our LMS-solution as a public person (no username/password), and view a multi part video that can explain how much the person can save using our software. The logging in part is no problem, so my question has more to do with whether it's possible to have a user watch the first part of a video, be asked to input a value (monthly expenditure for instance), and get a calculation or even a graph in return. I assume there'll be some javascripting involved, which is fine, but I'm wondering if anyone has some input on the idea.

This topic has been closed for replies.
Correct answer Lilybiri

Sure you can. Use a Text Entry Box or a Scrolling text interaction to capture the user input. Depending on the complexity of the mathematical operations you may not even need JS, but can do it with advanced or shared actions. In those actions the four mathematical operators are available. Showing the result is done by inserting the variable containing the result in a text container. Here is an example of a calculation only with advanced actions:

https://elearning.adobe.com/2019/01/calculate-expiry-date-expression-variables/

1 reply

Lilybiri
LilybiriCorrect answer
Legend
October 15, 2019

Sure you can. Use a Text Entry Box or a Scrolling text interaction to capture the user input. Depending on the complexity of the mathematical operations you may not even need JS, but can do it with advanced or shared actions. In those actions the four mathematical operators are available. Showing the result is done by inserting the variable containing the result in a text container. Here is an example of a calculation only with advanced actions:

https://elearning.adobe.com/2019/01/calculate-expiry-date-expression-variables/

therealandreas
Participant
October 15, 2019
Awesome! That's super helpful
Lilybiri
Legend
October 15, 2019

You're welcome. You'll find a lot of use cases on my blog, but the one I posted a link was only available in the eLearning community. My blog is blog.lilybiri.com.