Field Masking - Specific Use SSN

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Field Masking - Specific Use SSN

Oscar
All,

I just wanted to see if there is a possibility to mask a field to have a formatted value that would match the U.S. SSN this format would be ###-##-####. I am looking to add the - between the digits.

As a second question, I am looking to  replace the first 5 digits with * is this something that could be achieved?

I am utilizing Orbeon Forms 2019.2.2

Regards,

Oscar

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/827d6f89-9fb4-4a53-9fc4-59c69ba1e24co%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Field Masking - Specific Use SSN

Alessandro  Vernet
Administrator
Hi Oscar,

If you consider what users type as a string, you can validate it matches a
certain format with a regex, and the function `matches(., 'your regex')`.
For validation, would this work for you?

Replacing the first 5 digits by "*" is a bit more tricky. You could do this
in a calculation, but that would also replace them in the data, which I
imagine you don't want. So, I think that if you also need this, you would
need to create your own XBL component, which would have the ability to show
to users something different than what is stored in the data.

As a side-note, I know that the goal is to prevent someone looking over the
user's shoulder to see the SSN after it has been entered, but having a
textfield where "55-555-5555" is replaced by "**-***-555" on tab out can
also be confusing. What is the user comes back to the field, and changes
"**-***-555" into "**-***-556"? Should you then change the stored value to
"55-555-5556"? If you need this, I think that it would be better if the
field changes its value back from "**-***-555" to "55-555-5555" when the
fields gets the focus. But again, you would need to create an XBL component
for this.

I hope this helps,

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1596751969417-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet