Skip to main content
therealandreas
Participant
Oct 15, 2019 11:35 AM UTC
Answered

Doing math on user input and displaying

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 is closed to new replies. Start a new post to keep the conversation going.
Lilybiri
LilybiriCorrect answer
Legend
Oct 15, 2019 12:07 PM UTC

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/

3 replies

Lilybiri
LilybiriCorrect answer
Legend
Oct 15, 2019 12:07 PM UTC

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/

Translate
therealandreas
Participant
Oct 15, 2019 12:48 PM UTC
Awesome! That's super helpful
Translate
Lilybiri
Legend
Oct 15, 2019 1:42 PM UTC

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.

Translate