Hi, so I want to validate the submit only if my fetch to an api I am using is also submitted.
I tried to use it like this :
$w ( “#wixForms1” ). onWixFormSubmit (() => {
console . log ( res . error ?. data ?. details != undefined )
if ( res . error ?. data ?. details != undefined ){
return false
} else {
return true
}
})
So , “res . error ?. data ?. details” is defined only when there is an error.
But I don’t know why the code don’t run at all