cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

How can I make single line of text controls show the same values?

Jump to solution

Is it possible in a Nintex classic form to create a single line of text field that can be used in multiple places but maintain the same values? Without using a calculated field. I want the users to be able to change it from two different tabbed views i created in my form.

Tags (1)
0 Kudos
Reply
3 Replies
Workflow Hero

Re: How can I make single line of text controls show the same values?

Jump to solution

You're going to need to use JavaScript.

You could do something like this (I have not tested this):

NWF$('#' + FieldOne).change(function(){
     NWF$('#' + FieldTwo).val(NWF$('#' + FieldOne).val());
});

NWF$('#' + FieldTwo).change(function(){
     NWF$('#' + FieldOne).val(NWF$('#' + FieldTwo).val());
});

I'm not sure off the top of my head if this will trigger a loop.

You may want to add in an 'if FieldOne != FieldTwo' and vice versa.




SharePoint 2013 On-Prem | Nintex Forms & Workflow Enterprise
Reply
Workflow Hero

Re: How can I make single line of text controls show the same values?

Jump to solution

Hi Chad - This example worked perfectly for what I need! Thanks so much for your help.

Would you happen to know how to do this for a radio button field as well?

-Chris

0 Kudos
Reply
Workflow Hero

Re: How can I make single line of text controls show the same values?

Jump to solution

I did a little testing with this, but don't have more time to look into it right now. It worked for me a couple times and then stopped. I'm not sure exactly sure what the issue is, but this should get you started:

NWF$('#' + optOne + ' input').change(function(){
     if(NWF$(this).is(':checked')) {
          var id = NWF$(this).attr('id');
          id = id.substr(id.lastIndexOf("_"));
          NWF$('#' + optTwo + id).attr('checked','checked');
     }
});
NWF$('#' + optTwo + ' input').change(function(){
     if(NWF$(this).is(':checked')) {
          var id = NWF$(this).attr('id');
          id = id.substr(id.lastIndexOf("_"));
          NWF$('#' + optOne + id).attr('checked','checked');
     }
});

optOne is the Client ID JavaScript Variable of the first radio button field, and optTwo is for the second one.

Keep in mind this will only work if both choice fields have identical options in the same order.




SharePoint 2013 On-Prem | Nintex Forms & Workflow Enterprise
Reply