Link separate radio button fields
I have FieldA set up as radio buttons with values 0 and 1. Also FieldB set up as radio buttons with values 2, 3 and 4.
I need to make it compulsory to select only one value across both fields. Eg- If 3 in FieldB is selected, I do not want 0 or 1 in FieldA to be selected; if 1 is selected in FieldA I do not want 2,3 or 4 selection in FieldB to be allowed. I want FieldA and FieldB to function as one radio button field with five options effectively.
How can I set this up?