Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How to fix JS to ignore spaces when checking for duplicates.

nowackem
Level 4
Level 4

I have a form that checks for duplicate names (these are first and last names within one field) but I would like the script to ignore any spaces at the end or before the text (but not if there is a space between words) no matter how many words are in the field. For example, the current script would not catch Firstname Lastname(space) being the same as Firstname Lastname(no space) hence no duplicates detected. Anyone know how to update this? I seem to break it every time I try. The form is located here: https://drive.google.com/drive/folders/1gneWXGTgzvCEeZHBxumR3v429X6nBzbJ?usp=sharing

Thank you!

 

1 Accepted Solution
Mayank_Tiwari
Correct answer by
Employee
Employee
2 Replies
Mayank_Tiwari
Correct answer by
Employee
Employee