Integer field formatting

Peter_NordqvistPeter_Nordqvist Customer Adept IT Monkey ✭✭
Hi
If i put a Intger field in a request offering, the field gets formatted when i go to next prompt.
Ex. put 123456789 in the field, gets formatted to 123 456 789.
The mapped value is still 123456789, but it can be confusing for the  customer who enter it..
Is there a way for not formatting the value?

Answers

  • Nicholas_VelichNicholas_Velich Cireson Consultant Ninja IT Monkey ✭✭✭✭
    Hi Peter,

    When I enter an integer like that, I'm seeing it formatted as "123,456,789", rather than with with spaces as you showed above. Perhaps there is a Portal version difference or customization that is causing it to behave differently.

    In any case, that is probably not relevant, and there are two options here if you want to preserve the formatting as "123456789":

    1. JavaScript/JQuery code in CustomSpace to change the formatting of this Integer control on that page
    2. Since Strings don't have any auto formatting associated with them, you could configure the prompt as a String instead of an Int, and configure a regular expression (regex) to only allow for integer input. This can be configured directly in the Request Offering's configuration.

    Thanks,
    Nick
  • Peter_NordqvistPeter_Nordqvist Customer Adept IT Monkey ✭✭
    Hi @Nicholas_Velich
    Were running 8.6.2.
    Yes, a string field with regex would do it, but i thought someone had an example for a custom javascript to put in customspace to solve such things.
    Thanks!
Sign In or Register to comment.