2 Replies Latest reply on Oct 14, 2009 10:03 AM by paitkenhead

    Trimming whitespace from input fields


      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.