Avatar

Level 4

I tried this for my form but for some reason it won't work if I use a double == it only works if I use a single =, but it doesn't populate the 2nd drop down correctly.  It is as if it disregards what the raw value is and just populates the 2nd drop down with the information associated with the top selection with the drop down.  So regardless if I choose Text 1 or Text 2 in my drop down I always get box 2a and 2b.  Any ideas?!?

var type = Contracttype.rawValue

var subtype = contractsubtype.rawValue

if(type.rawValue = "Text 1"){

    contractsubtype.clearItems();

    contractsubtype.addItem(" ","0");

    contractsubtype.addItem("box 2a","1")

    contractsubtype.addItem("box 2b","2");

}

else if(type.rawValue = "Text 2"){

    contractsubtype.clearItems();

    contractsubtype.addItem(" ","0");

    contractsubtype.addItem("box 2g","1")

    contractsubtype.addItem("box 2h","2");

}