Is it possible to force the use of a $ sign on a field?

  • hansenT
    Asked on February 9, 2015 at 2:37 PM

    I found an answer to this but it was dated 2011. Was wondering if this function was available now??

    (My form asks for a dollar amount for the cost of an AD. I would like to have it entered with a dollar sign.)

     

    Thanks!

  • raul
    Replied on February 9, 2015 at 3:43 PM

    Are you referring to this form: http://www.jotform.us/form/50276207253147? And you want to force your users to enter a dollar sign on the Invitation cost field?

    Is it possible to force the use of a $ sign on a field? Image 1 Screenshot 30

    If so, you could try using an input mask to include the $ sign on that field.

    Is it possible to force the use of a $ sign on a field? Image 2 Screenshot 41

    This will force the use of the $ sign when a value is entered in the text box.

    Please give it a try and let us know if it helps.
    Thank you.

  • hansenT
    Replied on February 9, 2015 at 4:11 PM

    Yes, that works, however, I don't want to limit the amount of numbers to go in the box following the dollar sign. The dollar amounts could vary from 2 digits to 4 digits.

    I did try unmarking the "Fill Mask Validation" and that enabled me to not have to have 4 digits. But if I just put in 2 digits, then it leaves a left over dash mark and I'm afraid the uses may get confused.

    Does that make sense???

  • raul
    Replied on February 9, 2015 at 4:36 PM

    Ok, I made further testings and, unfortunately, this is the only way I found to accomplish this. To avoid confusions to your users, you may use a default value for them to see how they should enter this value. For example, something like this:

    Is it possible to force the use of a $ sign on a field? Image 1 Screenshot 20

    So, this should allow your users to know that if they want to enter a value of $12 they should enter $0012.

    The other way I can think to do this would be using the full source code of your form and use a custom script to create the mask. You can even use a library like this one: http://javascriptools.sourceforge.net/

    I hope this helps.

    If you have further questions, please let us know.
    Thank you.

  • hansenT
    Replied on February 9, 2015 at 4:48 PM

    thanks for looking further into it. i might do what you suggested. i might also check into the source code stuff, however, sometimes, that just confuses me even more...lol!

    worse case scenario, the field won't contain a dollar sign. the world won't end if i have to do that :)

  • raul
    Replied on February 9, 2015 at 4:55 PM

    Ok, I'm glad I could be of assistance :)

     

    If you hit a bump or have any questions, please let us know.
    We'll be happy to help.