I'm trying to trim spaces from a text field. Tried using it in the "onKeyUp", with no luck. I tried to do with the following JS function code
trimSpaces: function (fieldID)
The catalog itself is going to trim the leading space and appending space in value of a text field when saving it into the database . With that , if you use the JS code above to achieve trimming as you typing in a text field here , it will not work .
Release : 17.2
Component : CA SERVICE CATALOG
You should use replace(/\s/g, '') instead of trim()
for example , the code above should be
var hostShortName=ca_fdGetTextFieldValue(ca_fd.formId,fieldID).replace(/\s/g, '')