Skip to main content
Solved

Removal of whitespaces in RichText Content.

  • 27 June 2024
  • 5 replies
  • 70 views

Hello everyone!

I am generating a document using DocuSign CLM. I have a text box field in the intake form and am using a Rich Text Merge Tag in the Word template to display it.

Is there a way to eliminate the extra spaces in the text box field within the document? For example, if the user accidentally inputs unnecessary spaces or paragraphs at the top or bottom of the actual content in the in the text box field.

It would be a big help if someone could assist me with this.

Thank you!

5 replies

Userlevel 4
Badge +8

Hello @alexisdg 

I hope you doing great. First of all you can do anything on doc gen form “Text Box” field. Text Box do not allow to write the Regex. 

but you can do that in the Workflow to eliminate the spaces with the help of C#.
 Here is C# to eliminate the space form beginning and at the last.

String a = “ Test “;
String trimmedString = a.Trim( ‘ ‘ );
Console.WriteLine(trimmedString);

Thanks!

Badge +2

Hello Pawan,

 

Thank you for the information! I hope you're also doing well. I'm actually looking to manipulate the content directly through intake forms or templates without modifying the existing workflow. Do you have any insights or tips on whether this is possible, such as editing the merge tag, intake form configuration, or making adjustments in the template itself? I agree that being able to use regex in text boxes would simplify things greatly, but unfortunately, it's not possible. 

 

Thank you! I really appreciate your help.

Userlevel 4
Badge +8

Hey,

No directly on intake form, I do not think so. But there is one thing that you can try.

enable the “Edit with JSON” option in doc gen settings. and from there you can manipulate the field and let me see what I can help you.

Thanks!

Badge +2

Hello again Pawan!,

 

Ahh! Yes, I remember that setting. Thank you for giving me the idea! I'll try to work around it and see if there's a way to do it. I'll also leave a message here if I manage to solve it. 

 

Thanks a lot! I really appreciate your help.

Userlevel 4
Badge +8

Hey

Yeah no problem, Me too working on that. Will let you know.

Reply