I have a field that does not need any white spaces. I need to remove any as they are entered. Here\'s what I\'m trying... no luck so far
$(\'#noSpacesField\'
We can achieve the desired outcome with pure javascript.
Input
removeSpace(e) } />
Js Function
function removeSpace(e){ let val = (e.target.value).trim(); console.log(val); }
However on a form submit button clicked
console.log( ( (" test case ").trim() ).replace(" ", "") )