I would like to ask for your help with this issue we have for Velo.
Basically, we are trying to connect our Custom Signup Form to a second collection called RegistrationForm so we can get their Membership Type.
Here is the code we use on Custom Sign up.
import wixData from ‘wix-data’ ;
$w . onReady ( function () {
$w ( '#registrationForm1' ). onWixFormSubmitted (( event ) => {
**let** toInsert = {
"title" : $w ( '#input2' ). value ,
"firstName" : $w ( '#input4' ). value ,
"lastName" : $w ( '#input3' ). value ,
"membershipType" : $w ( '#dropdown1' ). value
}
wixData . insert ( 'RegistrationForm' , toInsert )
. then (( result )=>{
**let** item = result ;
console . log ( item + "Table Updated" );
})
. **catch** ( ( err ) => {
**let** errorMsg = err ; //"The user closed the forgot password dialog"
console . log ( errorMsg )
})
});
});
If we preview the site and test it, the data on the signup form passes to the sandbox mode of the second collection which means it is working. However, it we do it on the live site version it won’t work.
Thank you for your help!