Skip to main content
Nintex Community Menu Bar

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

  • August 5, 2019
  • 6 replies
  • 189 views

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"

 

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

Thanks @mohithmk7878!


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 


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

@bickela 

 


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

@lowecm 


Forum|alt.badge.img
  • Novice
  • July 23, 2024

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!