I have a survey with many questions including two text fields. These two text fields must contain between 5 and 250 characters. Some users add a blank space to reach 5 characters. For example, they enter "Stop " then I have to modify their entry to meet the 5 character minimum requirement. I need to validate all data before submitting.
I'd like to trim white space and base the minimum character count on the resulting string. I've created a survey with some JavaScript that does this, but the JavaScript doesn't get called at the right time and the constraint doesn't work.
I've attached an XLSForm and a JavaScript file. (JSUtils.txt needs to be renamed to JSUtils.js.) Does anyone know how to get this to work? Thanks.