Question appearance: input dollar amount?

696
6
Jump to solution
04-15-2022 09:06 AM
hsem_sturgill
New Contributor III

Hey Survey community,

There must be a simple solution to this, but I have not found it yet. Is it possible to have a $ sign populated in a question and restrict it to decimal inputs? I just want a clean way to ask the respondents to input dollar amounts without having to find the $ sign on their phone and put that in.

I am using Connect, and I don't see anything in Appearance that would help me out.

Much thanks!

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

With this in the constraint column:

$00.99;_

The form looks like this:

jcarlson_0-1650042341203.png

Clicking on to the question and typing "1234" fills it in, keeping the other characters.

For larger values, you can just extend the number of 0s before the decimal. When filling in the question, typing the "." character jumps the input to that section of the input mask. Pictured below is the result of me typing "100.30".

jcarlson_1-1650042472405.png

The form automatically strips blanks form the input, too!

- Josh Carlson
Kendall County GIS

View solution in original post

6 Replies
jcarlson
MVP Esteemed Contributor

You could use an input mask, but keep in mind that this will require the field to be a text field. Including a "$" character on anything but a text field isn't possible.

- Josh Carlson
Kendall County GIS
0 Kudos
hsem_sturgill
New Contributor III

Hey Josh,

The input mask makes sense for establishing the format of numbers, but what about prepopulating with a $ sign? It does not seem to work in "default".

Thanks for the help!

0 Kudos
jcarlson
MVP Esteemed Contributor

With this in the constraint column:

$00.99;_

The form looks like this:

jcarlson_0-1650042341203.png

Clicking on to the question and typing "1234" fills it in, keeping the other characters.

For larger values, you can just extend the number of 0s before the decimal. When filling in the question, typing the "." character jumps the input to that section of the input mask. Pictured below is the result of me typing "100.30".

jcarlson_1-1650042472405.png

The form automatically strips blanks form the input, too!

- Josh Carlson
Kendall County GIS
hsem_sturgill
New Contributor III

Dude, that's cool. Last question though. Do you know how to make it a range of values? If I add more zeroes, then it requires the input of that many decimal places, otherwise it says "input format not satisfied".

0 Kudos
jcarlson
MVP Esteemed Contributor

A range would be tricky for a non-numeric field. There might be a way to enforce a range using a second numeric field and some constraints, but it might be complicated, and not super user friendly.

What about having the form prompt the user for a numeric value, then just pipe that question into some text that's submitted to the data?

jcarlson_0-1650044308765.png

Ah, I just saw your followup post. Never mind then!

- Josh Carlson
Kendall County GIS
0 Kudos
hsem_sturgill
New Contributor III

Nevermind! it's the 99 at the end that requires two digits. I get it.

0 Kudos