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.
NWF.FormFiller.Events.RegisterAfterReady(function () { NWF$('#'+varShirtStyle).change(function(){ if (NWF$('#'+varShirtStyle + ' input:choice').val() == 'Instructor'){ NWF$('#'+varShirtColor).val('Red'); } }) })