Maybe if I share more code, it might help? This isn’t all of it but below is how it begins, do you think it might have to do with import local from wix storage ?
import { local } from ‘wix-storage’ ;
//RADIO BUTTONS
$w . onReady ( function () {
$w ( “#radioGroup1” ). onChange (()=>{
let selectedIndex = $w ( “#radioGroup1” ). selectedIndex
console . log ( selectedIndex )
if ( selectedIndex === 0 ) { function1 ();}
if ( selectedIndex === 1 ) { function2 ();}
});
});
function function1 ( ){ $w ( ‘#bookingMultiStateBox’ ). changeState ( “acquireDetails2” )}
function function2 ( ){ $w ( ‘#bookingMultiStateBox’ ). changeState ( “enquiryForm” )}
$w . onReady ( function () {
$w ( “#radioGroup2” ). onChange (()=>{
let selectedIndex = $w ( “#radioGroup2” ). selectedIndex
console . log ( selectedIndex )
if ( selectedIndex === 0 ) { function3 ();}
if ( selectedIndex === 1 ) { function4 ();}
});
});
function function3 ( ){ $w ( ‘#bookingMultiStateBox’ ). changeState ( “propertyPurchase1” )}
function function4 ( ){ $w ( ‘#bookingMultiStateBox’ ). changeState ( “remortgageOptions1” )}
/
//DATA VALIDATION
$w . onReady ( function () {
$w ( “#bookingFirstName, #bookingLastName, #bookingPhoneNumber, #bookingEmail” ). onChange ( function () {
if ( $w ( “#bookingFirstName” ). value . length > 0 && $w ( “#bookingLastName” ). value . length > 0 && $w ( “#bookingPhoneNumber” ). value . length > 0 && $w ( “#bookingEmail” ). value . length > 0 ) {
$w ( “#submitButton1” ). enable ();
} else { $w ( “#submitButton1” ). disable (); }
});
});