Solved
How can I trim spaces from a text response?
I have surveys set up as scholarship applications, they include email triggers that send a recommendation request. The recommendation requests have a link to a second survey for collecting the recommendation letters. I have embedded some data in the URL (student name and email address, some other info) so that it automatically populates in the recommendation form.
The problem is that any time there is a space in the embedded data it causes the URL to not work, and come up with {"code":403,"message":"Invalid Token"} in the browser for the person who is trying to send a recommendation.
Yes, I know how to put validation on a question that can force students to not use a space, but some people have a space in their names. (Although some test have just turned out to be people who hit the spacebar before moving to the next field.)
I would like to create embedded fields that would be filled from the student's responses, but transformed to remove spaces. (Or, hypothetically any other offending character.)
Or, perhaps another, better solution would be how can I allow a space in the URLs without breaking the URL?
Best answer by TomG
You need to urlencode your link parameters. You can do this with a web service or JavaScript.
View originalLeave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.