Canvas Initiate

Settings field value using a button

I have 2 text fields in my form, ClientNumber1 and ClientNumber2.  I want to have a button beside the ClientNumber1 field that when pressed, will populate the client number from ClientNumber1 to ClientNumber2.


Is this possible?

0 Kudos
1 Reply
Nintex Employee
Nintex Employee

Re: Settings field value using a button


Unfortunately there is no out of the box way to acheive this functionality.

The only way to do it is to use a Nintex Classic form and Javascript.

Add a button to your form and configure the button action as Javascript.

In the Advanced section of the button configuration for Client Click add copyText()

This triggers the below function which is added to the Form Settings > Custom Javascript section.

function copyText(){
var text1 = NWF$("#" + SLT1).val();
NWF$('#'+ SLT2).val(text1); 

In the configuration of the source text box under Advanced set "Store Client ID in JavaScript variable " to "Yes" and "Client ID JavaScript variable name" to SLT1

Do the same for the destination text box but call it SLT2


Clicking the button copies what ever is in the first text box to the second one.

I have attached a sample form which demonstrates this.  


0 Kudos