Exclude Blank space in the single line text variable

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2024 01:26 AM
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.
Thank you
Regards,
Jainil Shah
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2024 01:57 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2024 06:02 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2024 07:56 AM
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