Hi,
I have 1 text field and 3 check box in my form. Depending on text typed in text field different checkbox will be ticked. I am using below code on exit event of text field. When I use this code all 3 checkbox could be ticked at a time. I am trying that only one check box will be ticked at time (something like radio button, only one can be ticked at time). I am trying to avoid radio button because once it is ticked, anyone of the group will remain as ticked.
switch(TextField1.rawValue){
case "Address1":
CheckBox1.rawValue = "1";
break;
case "Address2":
CheckBox2.rawValue = "1";
break;
case "Address3":
CheckBox3.rawValue = "1";
break;
}
I also tried below code on exit event of text field but no checkbox is being ticked.
if (TextField2.rawValue == "Address1" || TextField2.rawValue == "Address2" || TextField2.rawValue == "Address3" || TextField2.rawValue == "Address4"){CheckBox1.rawValue = "1"}
else if (TextField2.rawValue == "Text1" || TextField2.rawValue == "Text2" || TextField2.rawValue == "Text3" || TextField2.rawValue == "Text4"){CheckBox2.rawValue = "1"}
else if (TextField2.rawValue == "Item1" || TextField2.rawValue == "Item2" || TextField2.rawValue == "Item3" || TextField2.rawValue == "Item4"){CheckBox3.rawValue = "1"}
else (TextField2.rawValue == "") {CheckBox1.rawValue = "0" && CheckBox2.rawValue = "0" && CheckBox3.rawValue = "0"}
Any idea how can I move forward, pls
Rgds