I'm finding that some of my script logic is failing when an end-user happens to deposit some whitespace into an optional input field. In other words, if the user hits the space bar while an input field has the cursor, then moves on, it is no longer a null field, and my scripts will expect data to be there (but the data is whitespace).
What is the most straightforward way to trim whitespace (or eliminate a string that's nothing but space) from any and all input fields? Thanks for reading.
Whenever a user fills in and leaves the field it will trim the spaces (you will see this happen on the screen).
Works perfectly, and great insight into a function I did not know existed. Thanks.