Skip to main content
Nintex Community Menu Bar
Solved

Field equals other field

  • Jun 15, 2022 6:59 PM UTC
  • 5 replies
  • 223 views
  • Translate All

kgiles
Forum|alt.badge.img+4

In my form when one drop down field changes "EpisodeID", I would like Title to mirror the change with the exact same info selected. Thanks

Best answer by Garrett

Hi @kgiles 

 

Using Classic Form - 

Using Choice control named ChoiceType

Set the values in Choices field

Set the JavaScript variable name of 'txtChoice' for the control

For the Title - Text control - Set the JavaScript variable "txtTitle"

 

Next, we need to add some interactivity using JavaScript.

Add custom JavaScript to: Form Settings > Custom JavaScript

 

NWF$(document).ready(function () { NWF$("#" + txtChoice).change(function () { var x = NWF$("#" + txtChoice + " option:selected").val(); var y = NWF$("#" + txtTitle); y.val(x); }); });

 

When the Choice changes, this function is run.

It set the value of Title (var Y) to the value of Choice (var X) 

txtChoice and txtTitle is defined in the Control settings.

 

The result

 

Hope this helps

View original

5 replies

Garrett
Forum|alt.badge.img+16
  • Scout
  • Jun 15, 2022 11:26 PM UTC

Hi @kgiles 

Which type of Form are you using Responsive or Classic?

 

Using Responsive Form - Add a choice dropdown control

Add a Rule for the Title control. Set the Title value to the value of of the dropdown

The result

 

 

 

 

Translate

kgiles
Forum|alt.badge.img+4
  • Author
  • Rookie
  • Jun 16, 2022 1:06 PM UTC
I am using Classic. Thank you for this though.
Translate

Garrett
Forum|alt.badge.img+16
  • Scout
  • Answer
  • Jun 16, 2022 2:29 PM UTC

Hi @kgiles 

 

Using Classic Form - 

Using Choice control named ChoiceType

Set the values in Choices field

Set the JavaScript variable name of 'txtChoice' for the control

For the Title - Text control - Set the JavaScript variable "txtTitle"

 

Next, we need to add some interactivity using JavaScript.

Add custom JavaScript to: Form Settings > Custom JavaScript

 

NWF$(document).ready(function () { NWF$("#" + txtChoice).change(function () { var x = NWF$("#" + txtChoice + " option:selected").val(); var y = NWF$("#" + txtTitle); y.val(x); }); });

 

When the Choice changes, this function is run.

It set the value of Title (var Y) to the value of Choice (var X) 

txtChoice and txtTitle is defined in the Control settings.

 

The result

 

Hope this helps

Translate

Garrett
Forum|alt.badge.img+16
  • Scout
  • Jun 19, 2022 1:04 AM UTC

Hi @kgiles 

 

Was my suggestion of any help? Please let me know, so I can see if I'm able to assist further

Translate

kgiles
Forum|alt.badge.img+4
  • Author
  • Rookie
  • Jun 20, 2022 6:22 PM UTC
This is great! Thank you for your help!
Translate