You are right that the other examples created for the Classic Designer are not going to work in the New Designer. The solutions in the classic designer are designed to use JQuery to manipulate the attributes of the fields directly. But the New Designer doesn't use JQuery, and cannot access the field attributes directly.
Luckily, something like this is possible using the LFForm interface that is built into the New Designer.
The following code is assuming that you have a radio button with class name of triggerRadio and values of A, B, and C. It also assumes you have a radio button with class name of targetRadio and values of 1, 2, and 3.
Using options from the LFForm interface, it grabs the first field that it finds with the triggerRadio and targetRadio classes, and then monitors for changes to the triggerRadio field and uses that to update the value of the targetRadio field.
var triggerField = LFForm.findFieldsByClassName('triggerRadio')[0];
var targetField = LFForm.findFieldsByClassName('targetRadio')[0];
//When the triggerField is changed, check
//for its value and change the targetField
//accordingly.
LFForm.onFieldChange(function(){
var selectedTrigger = LFForm.getFieldValues(triggerField);
if(selectedTrigger.value == 'A') {
LFForm.setFieldValues(targetField, {value: "1"});
}
else if(selectedTrigger.value == 'B') {
LFForm.setFieldValues(targetField, {value: "2"});
}
else if(selectedTrigger.value == 'C') {
LFForm.setFieldValues(targetField, {value: "3"});
}
}, triggerField);
Note that this is optomized for radio buttons, where only a single value is marked at a time. If you were to try to use this with checkboxes, where multiple values could be selected, it wouldn't work without modifications because line 8 of the code would be getting an array of values instead of a single value, and the if statements that follow wouldn't work in that case. We would need to add code to check if it was an array or a single value, and proceed differently based on the result.