Remove spaces when I click input fields

I have an input fields of mobile number where I add spaces when user is done typing.

How will I be able to remove spaces in input fields when I click it again?

I tried using the extended properties but no luck.

This is made in OS10, web.

Solution

Hi Arci,

use BuiltIn fucntion "Replace"

on input widget onblur property

SyntaxEditor Code Snippet

Replace(MobileNumber," ","")

Regards

Rahul Sahu

Solution

Rahul Sahu wrote:

Hi Arci,

use BuiltIn fucntion "Replace"

on input widget onblur property

SyntaxEditor Code Snippet

Replace(MobileNumber," ","")

Regards

Rahul Sahu

Thank you Sir.


Follow up question. If I did not change anything in input fields (The onchange action will not be trigger), how will I be able to add spaces again if I out of focus the input fields? (Click outside the widget)

 

 

Arci, you can use the OnBlur event to handle that. Ideally you need only OnBlur event as as it is always going to fired irrespective of user changes the phone number or not.

Thanks

Junaid

Hi Arci,

I think you want this. Mobile Number Demo

OnBlur and Onfocus events are working for that.


Hope this will help you.


Regards

Rahul Sahu

Rahul Sahu wrote:

Hi Arci,

I think you want this. Mobile Number Demo

OnBlur and Onfocus events are working for that.


Hope this will help you.


Regards

Rahul Sahu

 

 That's what I actually need. Thank you!

Welcome Arci,

Glad to help you.


Regards

Rahul Sahu