Solved

Format variable or text box as currency

I'm trying to build a table from a group of text boxes that allows users to make different calculations about asset values. Ideally, the user chooses and asset from a drop down list and chooses a discount (as a %) to apply to the asset value. A text box then contains the discounted asset value.

The logic looks like this: Condo = $2,000,000 x 65% = $1,300,000

Lectora can multiply the numbers and set a variable equal to the product, but the result is 1300000.

Is there a way to format the variable or the text box to make a number a dollar amount?

Solutions (2)

Hello davidcm,

Have a look at NumeralJS (http://numeraljs.com/)

Globalize (https://github.com/globalizejs/globalize)... as you scroll down look for "Currency module"

That should get you started in the right direction

-N

Hello davidcm,

There is not official (eLearningBrothers) video per-say presently (we are working on this) but there is documentation.... below is an earlier post/discussion

https://rockstars.elearningbrothers.com/discussion/301718/how-do-you-add-js-and-css-to-lectora

and an older article here:

https://www.trivantis.com/uncategorized/how-to-add-custom-interaction-to-your-training-using-javascript/

Best,

-N

Discussion (4)

Hello davidcm,

Have a look at NumeralJS (http://numeraljs.com/)

Globalize (https://github.com/globalizejs/globalize)... as you scroll down look for "Currency module"

That should get you started in the right direction

-N

Hello davidcm,

There is not official (eLearningBrothers) video per-say presently (we are working on this) but there is documentation.... below is an earlier post/discussion

https://rockstars.elearningbrothers.com/discussion/301718/how-do-you-add-js-and-css-to-lectora

and an older article here:

https://www.trivantis.com/uncategorized/how-to-add-custom-interaction-to-your-training-using-javascript/

Best,

-N

Thanks! Do you know of a video online that gives a quick explainer of using js with Lectora?

Thanks! I'll check it out. I appreciate the help.

Best, David