I'm trying to create a script to remove any double spacing from a specific field when a user submits a form . I have tried .trim() but doesnt seem to work. Any help appreciated.
var inTRIM=$CS.getValue("WorkOrder_Fields_301_UDF_CHAR18").trim();
$CS.setValue("WorkOrder_Fields_301_UDF_CHAR18",inTRIM);