Nintex Forms - If Box is Checked, Clear Associated Number Fields to Equal '0.'

  • 3 September 2019
  • 2 replies
  • 17 views

Badge +4

I have a Nintex Form (SharePoint 2013 On Prem). I have a check box that says, "Clear All Limits." If this box is checked on the form, there are 3 fields that should be cleared out, or to show '0' instead of whatever number(s) were in those fields before the box is checked. 

Is there a formula I can use that says, if box is checked, then make fields X1, X2, and X3 = '0'? 

4229i283951885DC6B06B.png

 


2 replies

Userlevel 6
Badge +22

Hi,
The screen shot is showing a classic form.  The only way to acheive this functionality in a classic form would be with custom Javascript.

In Responsive forms you can use a rule to set the value of the text Boxes to zero if the checkbox is ticked. 

4232i4C7B565369F196A8.png

 

For Classic forms the JavaScript would look like:

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

var opt= NWF$("#" + Yes); 
opt.change(function(){ 

if(opt.prop('checked')) 

   NWF$('#'+Text1).val(""); 

   NWF$('#'+Text2).val(""); 

   NWF$('#'+Text3).val(""); 
}); 
});

I have attached a sample classic form with the JS for you to look at if you require.

Badge +4

Thank you!

Reply