Exclude Blank space in the single line text variable

Community Alums
Not applicable

Hello,

 

Is it possible to exclude/restrict blank spaces while entering details in the single line text variable in the catalog item?

if yes, kindly share the details to achieve this.

Exclude blank spaces.png

Thank you

Regards,

Jainil Shah

3 REPLIES 3

Mark Manders
Mega Patron

No. While entering, you can do whatever you want. You could apply a validation on the field to check if there are any spaces and if so delete them, or place a warning or even empty the field and have them type again, but you can't prevent spaces from being added while typing.

Best thing would be a field message telling people upfront not to use spaces and if the do, just remove them on submitting the form.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Community Alums
Not applicable

Let me rephrase the requirement, we have character limit to 18 for one of the variable. While filling the value if user enters blank space then it should not be considered as character.

Is it doable? if yes, how?

Same answer: if you only allow 18 characters and a user uses a space, it will count to 18 characters. If you allow for more and there's a space in there, you can get it out of there on saving, as long as it's 18. 


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark