Get Raw user input¶
Function that returns the raw input on the calculator field as a string. Instead of showing the value used for the calculation, it gives whatever characters the user input. This includes any number as well as special characters allowed in the calculator fields such as +, -, *, /, (, ), and e (interpreted as “times ten to the power of” or as Euler’s number )
Syntax¶
To obtain the raw input of the user for the variable myVar and store it as a string for later use, you would user the following code:
var varName = 'myVar';
var rawString = ctx.getRawInput(varName);
Warning
This function only works inside a onResult context.