A descendant of ITPQuestion, representing a number question on a form. Transforms the simple input into multiple inputs, one for decimal and one (optional) for fractional digits. Validates against maximum total and fraction length.
constructor |
|
ITPNumberQuestion |
Trivial |
public methods |
|
- |
|
overrides |
|
initScreenElements() |
Replaces the simple input element by two: one for the decimal digits and one (optional) for the fractional digits. Binds to events and associates jQueryUI classes. |
setInternalAnswer(pAnswer) |
Applies pAnswer to the internal answer variable and the hidden input element. |
getScreenAnswer() |
Returns a representation of the values from the decimal and the fractional digit elements, separated by a dot. |
setScreenAnswer(pAnswer) |
Splits pAnswer based on the dot and applies it to the decimal and fractional digit elements. |
validate(pAnswer) |
Checks whether pAnswer is numeric and if the number of decimal and fractional digits are within the limitations set by totaldigits and fractiondigits (note that this has always been implemented as "maximum number of decimal digits equals totaldigits minus fractiondigits). |
other methods |
|
- |
|