How to replace the line breaks with spaces in the recognized text field

If you have the excess line breaks in the value of the text field, you can easily replace it with spaces or any other symbol.

To do this, open the field Properties and go to the Data tab. Click the Edit... button under the AutoCorrect options:


and enable the Use script option:


Click the Edit... button to edit the script and add the following strings:

//Autocorrection script
//C# .Net
//Replace the line breaks in the value with spaces
string val = Value.Text;
val = val.Replace("\r\n", " ");
val = val.Replace("\n", " ");
Value.Text = val;

Save all the settings.


Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request



Please sign in to leave a comment.

Recently viewed