bhashwar_bhatta

Re: Reset button to clear fields on form

Jump to solution

No Luck.

function myCustomResetFormFunction() {

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

}

client id for clearing button: myCustomResetFormFunction();

0 Kudos
Reply
cju
Scout

Re: Reset button to clear fields on form

Jump to solution

Does it reset the values of all the controls?

0 Kudos
Reply
bhashwar_bhatta

Re: Reset button to clear fields on form

Jump to solution

Yes.  

0 Kudos
Reply
cju
Scout

Re: Reset button to clear fields on form

Jump to solution

And if you remove the content of your function (just set it like the following), does it remove the values of all the controls?

function myCustomResetFormFunction() {}

0 Kudos
Reply
kjhawkins
Novice

Re: Reset button to clear fields on form

Jump to solution

Caroline,

Do you know if your solution works on multiline text fields if "Append changes" is enabled and versioning is turned on?

Regards,

Ken

0 Kudos
Reply
cju
Scout

Re: Reset button to clear fields on form

Jump to solution

Hi Ken, 

I haven't tried yet . I think that it will work but you won't be able to delete what has already been added to this control (I mean history values of this control).

Caroline

0 Kudos
Reply
rangelin
Scholar

Re: Reset button to clear fields on form

Jump to solution

Caroline or anyone,

Can you tell me how to reset the value of a radio button? I've found the code to remove the check but the value of the radio button stays.

I have a choice control called 'SetYN' with two choices (Yes or No) with no default value. It is configure to display as radio buttons. I've enabled Store Client ID in JavaScript variable and set it as varSetYN.

I have a Panel which I am hiding when the choice 'SetYN' is equal to 'No'. 

Using the method above I have found how to uncheck 'SetYN' using the following code.

NWF$("#" + varSetYN).find('input:checked').attr('checked',false);

This function unchecks the radio box but the value stays.  Therefore my panel stays hidden even after I remove the checkbox beside the 'No'.

I've tried to set a calculated value control to equal SetYN and it displays it's value. I tried to clear it's value but it continues to hold the value of 'No' as well.

What can I do to make my choice control SetYN be a blank or NULL value same as when I first open the form so that the panel will display again with I clear it?

Any help is much appreciated.

0 Kudos
Reply
cju
Scout

Re: Reset button to clear fields on form

Jump to solution

Hi Randy,

If you're using Nintex Forms OnPremise, I think that this script can help you:

var control = NWF$("#" + varSetYN);

control.find('input:checked').prop('checked',false);

NWF.FormFiller.Functions.ProcessOnChange(control);

Hope this helps

Reply
rangelin
Scholar

Re: Reset button to clear fields on form

Jump to solution

Caronline,

Thank you so much for the reply. Yes that is exactly what I needed to fixed the issue. The function ProcessOnChange does make the control update the value. So now the other control with the validation rule displays the control again because the value of SetYN returns to unchecked.

Thank you,

Randy

0 Kudos
Reply
cju
Scout

Re: Reset button to clear fields on form

Jump to solution

Great ! I'm glad that I could help

0 Kudos
Reply