[Custom Input Masks] Need mobile version for Outsystems 10
Question
Forge component by Sara Gonçalves

Can this great plugin be ported to Mobile Apps for Outsystems 10?

Thanks.

mvp_badge
MVP
Solution

Hi Harin,

For mobile applications please use the following component which is specially created for OutSystems 10 mobile apps.

https://www.outsystems.com/forge/component/2258/input-masks-mobile/

Kind regards,
Martijn Habraken

Staff

Hi Harin, 

I agree with you, we need an enhancement to default validations. The web runtime's custom masks relies on jQuery, and messing with the DOM using jQuery breaks React's bindings.

However, we can leverage the simplicity of including JavaScript in the client side logic using the platform's mobile runtime, so, while a proper replacement for that component doesn't exist, you can try js reflex. Check this example:

  1. Replacement regex to be used onChange of an input
    1. var replaceRX = new RegExp(/[^0-9\-]/g);
    2. "140s0-004".replace(replaceRX, "")
  2. To calculate the IsValid widget's field
    1. var validate = new RegExp(/[0-9]{4}-[0-9]{3}/);
    2. validateRX.test("1344-244");

This particular example works for Portuguese postal codes.

Kind Regards,

João Grazina

mvp_badge
MVP
Solution

Hi Harin,

For mobile applications please use the following component which is specially created for OutSystems 10 mobile apps.

https://www.outsystems.com/forge/component/2258/input-masks-mobile/

Kind regards,
Martijn Habraken

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.