Skip to main content
Nintex Community Menu Bar

Button Click: Clear the contents of a Multi-Line Text Box

  • August 5, 2019
  • 6 replies
  • 232 views
  • Translate All

kelliganp
Forum|alt.badge.img+10

Hi Folks,

I have a form and a reset button in one of the sections. The button should clear a Checkbox, a text field, a date field, and a multi-line text field. This workd fine for me currently with the code below as the MLT control is connected to a "Multiple lines of text" list column set as "Plain Text".

function resetCancellation()
	{
		NWF$('#'+ jsvar_CancelCheck_CHK).attr('checked',false);
		NWF$('#'+ jsvar_CancellationComments_MLT).val("");
		NWF$('#'+ jsvar_CancellationDate_DTE).val("");
		NWF$('#'+ jsvar_CancellationSignature_TXT).val("");
	}

This solution is adequate for me at the moment but what if I wanted to set the Multiple lines of text" list column to "Rich Text" or "Enhanced Rich Text"? The javascript above does not work for that configuration. I saw some info 5that seemed related here but could not seem to understand how to make it work for the button click scenario.

Does anyone have any advice on how one would change my function to clear the MLT connected to Rich Text?

 

Thanks and Regards,

Patrick

 

6 replies

Forum|alt.badge.img

Try  NWF$('#'+ jsvar_CancellationComments_MLT).val('').change();

This works for my multiline "Enhanced Rich Text"

 
Translate

kelliganp
Forum|alt.badge.img+10
  • Author
  • Rookie
  • April 14, 2020

Thanks @mohithmk7878!

Translate

Forum|alt.badge.img

@mohithmk7878 wrote:

Try  NWF$('#'+ jsvar_CancellationComments_MLT).val('').change();

This works for my multiline "Enhanced Rich Text" fireboy and watergirl


Thank mohith, it works :D 

Translate

kelliganp
Forum|alt.badge.img+10
  • Author
  • Rookie
  • April 12, 2023

@bickela 

 

Translate

kelliganp
Forum|alt.badge.img+10
  • Author
  • Rookie
  • April 12, 2023

@lowecm 

Translate

Forum|alt.badge.img

Try  NWF$('#'+ jsvar_CancellationComments_MLT).val('').change(); solar smash

This works for my multiline "Enhanced Rich Text"

 

Thank you for the solution, I’ve been looking for it for a long time!

Translate