Skip to content

Commit c7eed8b

Browse files
1 parent a4b0f10 commit c7eed8b

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/inputmask.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ function init(Survey) {
2525
if (Survey.JsonObject.metaData.findProperty("text", "inputMask")) return;
2626
var properties = [
2727
"inputFormat",
28+
{
29+
name: "prefix",
30+
default: "$"
31+
},
32+
{
33+
name: "autoUnmask:boolean",
34+
default: true
35+
},
2836
{
2937
name: "inputMask",
3038
default: "none",
@@ -53,7 +61,10 @@ function init(Survey) {
5361
? surveyElement.inputMask
5462
: surveyElement.inputFormat;
5563
var options = {
56-
autoUnmask: rootWidget.autoUnmask
64+
autoUnmask:
65+
typeof surveyElement.autoUnmask !== "undefined"
66+
? surveyElement.autoUnmask
67+
: rootWidget.autoUnmask
5768
};
5869
if (surveyElement.inputMask != "none")
5970
options.inputFormat = surveyElement.inputFormat;
@@ -68,7 +79,7 @@ function init(Survey) {
6879
if (surveyElement.inputMask == "currency") {
6980
options.digits = rootWidget.numericDigits;
7081
options.digitsOptional = rootWidget.numericDigitsOptional;
71-
options.prefix = rootWidget.numericPrefix;
82+
options.prefix = surveyElement.prefix || rootWidget.numericPrefix;
7283
options.placeholder = rootWidget.numericPlaceholder;
7384
}
7485
if (surveyElement.inputMask == "datetime") {

0 commit comments

Comments
 (0)