How can I save answers to questions on multi-state form using this code?

@phil18799

This code I’ve used works to move through the states as it should but it’s only submitting data from radiogroup1.

Yes, exactly!
This code is just for one Radiobutton-Group.

$w.onReady(function () {
   $w("#radioGroup1").onChange(()=>{
      let selectedIndex = $w("#radioGroup1").selectedIndex
      console.log("Selected-Index: ", selectedIndex)
      $w('#statebox1').changeState("stateboxFormState"+selectedIndex);
   });
});

Sorry i do not know your project setup.
I just saw that you make here a mistake…

function function10(){$w('#statebox1').changeState("stateboxFormState6")} 
function function11(){$w('#statebox1').changeState("stateboxFormState6")} 
function function12(){$w('#statebox1').changeState("stateboxFormState6")} 
function function13(){$w('#statebox1').changeState("stateboxFormState6")}

…because you refer everytime to the same STATE, no matter on wich R-Button you click, you will always get shown —> “stateboxFormState6”
And this is surely not what you want!