Single line text field not considering leading and trailing spaces as output value

Arka Banerjee
Kilo Guru

Hi All,

 

I have a single line text field on a catalog form. I need to do some operations based on if there are leading or trailing spaces for the value entered in that field. The problem is when I am printing the value of the field with leading and trailing spaces as an alert, it seems to automatically trim the spaces and instead only displaying the characters, which means its not considering the spaces as output value. How do I include them as part of the value.

2 REPLIES 2

PVJShareKnowled
Tera Guru

@Arka Banerjee  Please share example of the text in the single line text field. 

If this input helped you, please give a thumbs up. It encourages me to answer more questions and support our community.

Regards,


Priyanka Jeganathan

'   Abc    '

 

Something like this