Search code examples
inputsharepointmasking

Sharepoint online: column input masking


I would like to mask the input of the column like some people do it for phone numbers or SSN input.

Something similar to this: [http://jsfiddle.net/rajaramtt/7s3eLokc/25][1]

enter image description here


Solution

  • I was thinking about solution for your use case. Based on my knowledge there is no OOTB solution for that. I came up to this:

    1. Build custom forms - custom page for forms, ... - something like this: https://github.com/pnp/sp-dev-fx-webparts/tree/master/samples/react-list-form You can change formatting for that particular column (I have done something similar, but for bigger application).
    2. Application customizer (really not good solution): Build Application customizer to check if you have opened edit/new form -> find text input -> apply mask for that input. Problems: really messy solution, not the good way to customize SharePoint, any change in SharePoint online can brake code, ...
    3. Power Apps: although I think there is no OOTB way to achieve it (I have never tried it), based on this link you can have a workaround - https://powerusers.microsoft.com/t5/Building-Power-Apps/How-to-format-the-phone-number-in-a-text-input/td-p/311244