Skip to main content
Nintex Community Menu Bar

Updating Multi Line Textbox control issue

  • September 11, 2014
  • 7 replies
  • 28 views

Forum|alt.badge.img+1

I am able to update single textbox using NWF$('#'+ varTitle).val("Message"); method, but it doesn't work on Multi Line Texbox

Anyone can help?

Thank you in advance.

7 replies

Forum|alt.badge.img+17
  • Nintex Partner
  • September 13, 2014

The query looks correct, but are you sure the ID of the textarea is correctly defined by #+ varTitle? Sometimes they have unique IDs. For each control on the form you can assign a unique CSS class. I've used the class to find the control using NWF$(.myclass).val("MyValue").


Forum|alt.badge.img+12
  • September 14, 2014

Hello,


Do you have other Javascript within the form as well?  Some other part of your code may be interfering with this.   Create a new form and put a multiline text field on it.  Give it the same variable name and try something like the following to just to rule out that its not something else causing the issue:

NWF$(document).ready(function() {

     NWF$('#'+varTitle).val("Message");

});

Let us know what you find!


Forum|alt.badge.img+1

That code works perfectly well with normal single line text box but no on a rich text box.

I managed to figure out a way to populate text to a rich text box as follow:

var txtArea = NWF$('#'+ varInventorytxt).closest('tr').find('div[id$="_inplacerte"]');

txtArea.html("testing 123");

Enjoy!


Forum|alt.badge.img+12
  • October 3, 2014

The reason it worked for me is the original post said multiline text box - not a rich text box.  That makes sense.


Forum|alt.badge.img

Hi Joseph,

I was trying to get the Multi Line Textbox value from Javascript. I tried all the possible methods and suggestions mentioned in different site. Luckily I saw your msg on this site and tried that and it worked!!!!

Thanks,

Sukesh


Forum|alt.badge.img+5
  • December 31, 2015

Hi Ankita,

I tried below code to get value from single line of text box and update the same value in some other text box on radio button click event

but it's not working for me. can you please give suggestions.

NWF$(document).ready(function(){ 

    var rad = NWF$('#' + mychoice123); 

  rad.find('input').on('change', function(){ 

      

var strMyRadioButtonValue = NWF$('#'+mychoice123).find("input:checked").val();

alert(strMyRadioButtonValue);

if(strMyRadioButtonValue=="Yes")

{

alert('came inside if condition');

var PhoneOffice = NWF$('#'+PhoneOffice).val();

alert(PhoneOffice);

NWF$('#'+PhoneMailing).val(PhoneOffice);

}

});

});            

it's going inside if condition and triggering alert but not getting value of text box. Frank FieldVadim TabakmanEuan GambleJan Eyres


Forum|alt.badge.img+4

why when I use IF Condition with single line of text ( this single line of text get his data from another control through java script) if condition not working correctly???