Skip to main content
Nintex Community Menu Bar

Nintex Form : Clear Text Value based on checkbox selection ?

  • September 15, 2017
  • 4 replies
  • 43 views

Forum|alt.badge.img+4

hi All,

Is it possible for us to clear the multiline textbox value when the checkbox selection changed ?

thanks

4 replies

Forum|alt.badge.img+14
  • Scholar
  • September 15, 2017

following should work

varCB and varMLTB are javascript variables assigned to checkbox and multiline text box controls

NWF.FormFiller.Events.RegisterAfterReady(function () {  
   NWF$('#'+varCB).change(function(evt){
       if(evt.target.status){    //if checkbox checked on
             NWF$('#'+varMLTB).val('');      
       }
  })
})

Forum|alt.badge.img+4
  • Author
  • September 15, 2017

hi Marian,

i tried your suggestion but too bad, its not working.

and i tried the below code as well,

NWF$(document).ready(function()
{
       NWF$('#'+A1).change(function()
       {
            NWF$('#'+A1A).val('');
       });

});

note: the code in Bold not working, anyone can help ?


Forum|alt.badge.img+4
  • Author
  • September 15, 2017

hi All,

to add on, my textbox is multiline text box - rich text

thanks


Forum|alt.badge.img+6
  • September 17, 2017

Use the following code :

NWF$(document).ready(function()
{
NWF$('#'+A1).change(function()
{
var txtArea = NWF$('#'+ A1A).closest('tr').find('div[id$="_inplacerte"]');
txtArea.html('');
});
});

Refer : https://community.nintex.com/thread/1518