Skip to main content
Nintex Community Menu Bar

Setting Value of Drop Down based on Radio button Choices in NINTEX forms (SP 2013)

  • December 3, 2020
  • 2 replies
  • 19 views

Forum|alt.badge.img+3

I am trying to set a drop down 'Status' field based on an 'Action' field that is displaying as two radio buttons.  (e.g., if 'Choice 1' is selected (radio button) from the 'Action' field  then it would auto populate the 'Status' field drop down to 'Status Dropdown 1')

 

This is the js Im trying to use (SP 2013) 

 

NWF.FormFiller.Events.RegisterAfterReady(function () {
NWF$('#'+varAction).change(function(){
if (NWF$('#' +varAction).find('input:radio[value="Choice 1"]').attr("checked","true")){
NWF$('#'+varStatus) .val ("StatusDropdown 1");
} else if (NWF$('#' +varAction).find('input:radio[value="Choice 2"]').attr("checked","true")){
NWF$('#'+varStatus) .val ("Status Dropdown 2");
});
});

 

I'm fairly new to js so its probably completely wrong, the logic makes sense to me but I'm missing something.  Thanks for any tips! 

2 replies

Forum|alt.badge.img+11
  • Scholar
  • December 3, 2020
You could try using cascade dropdowns instead.

Forum|alt.badge.img+11
  • Scholar
  • December 4, 2020
And or calculated values instead of js