Remove CR's from text field

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
justintime
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 8
Joined: Fri Jul 15, 2011 1:27 am

Remove CR's from text field

Post by justintime » Fri Oct 14, 2011 3:27 pm

I have a survey with a user entered txt field. When the user completes their entry, a button controller allows them to proceed to the next page. I would like to edit the user text field to remove all CRs so the text field is one long string. This will allow for ease of data collection for entry into SPSS.

Can anyone assist me in the correct script to remove any CRs in the text field?

townsend
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 430
Joined: Sun Feb 13, 2011 8:43 pm

Re: Remove CR's from text field

Post by townsend » Fri Oct 14, 2011 3:37 pm

This should replace all occurrences.

Code: Select all

replace CR with "" in field "myInput"
Look over the Replace function.
http://docs.runrev.com/

justintime
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 8
Joined: Fri Jul 15, 2011 1:27 am

Re: Remove CR's from text field

Post by justintime » Fri Oct 14, 2011 4:15 pm

Thank you!

Post Reply