THis is the code I used
export function submit_click(event) {
let toInsert = {
“title” : $w( “#dropdown1” ).value,
“firstName” : $w( “#firstName” ).value,
“lastName” : $w( “#lastName” ).value,
“eMail” : $w( “#email” ).value,
“phone” : $w( “#phone” ).value,
“birthday” : $w( “#datePicker2” ).value,
“address” : $w( “#address” ).value,
“callBack” : $w( ‘#callBack’ ).value,
“firstReg” :$w( “#firstReg” ).value,
“comments” :$w( ‘#textBox4’ ).value,
}
wixData.insert( “ReferalRegistration” ,toInsert)
wixLocation.to( “/referralsignup” );
}