Skip to main content
Nintex Community Menu Bar

Populate a choice field based off the value in another choice field.

  • January 14, 2020
  • 3 replies
  • 14 views

Forum|alt.badge.img+4

I am trying to make clothing order form. Shirts with different styles are available in different colors. What I want to do is when shirt style "X" is chosen i want my color options field to then display the colors that are available for that style. 

Below is my form and the code that I am trying to use to do this, I may be completely off with the code attempt, i was using another source as a reference to come up with this. Once I figure this out for once style I need to do this for 4 other styles and I'm not sure how to do that. 

6142i763F56FA0893B684.png

NWF.FormFiller.Events.RegisterAfterReady(function () { 
   NWF$('#'+varShirtStyle).change(function(){
     if (NWF$('#'+varShirtStyle + ' input:choice').val() == 'Instructor'){
        NWF$('#'+varShirtColor).val('Red');
     }
   })
})

 

 

3 replies

Forum|alt.badge.img+12
  • Scholar
  • January 14, 2020

@gwpeters ....have you consider using a seperate list and using lookup controls create a cascading dropdowns?


Forum|alt.badge.img+4
  • Author
  • January 14, 2020
I thought about that but figured there had to be a better way than that for this task.

Forum|alt.badge.img+4
  • Author
  • January 15, 2020

I have decided to take a different approach to this, I will ask in a new post.