Наконец-то я вернулся) Так, поехали!)
Just to start ball rolling, I will post your draft, as I have some questions, meanwhile I will keep looking for the information on the forum as well as on Velo Tech:
import wixUsers from ‘wix-users’ ;
$w.onReady( function () { });
//-----------------------------------------------------------------------------------------
export function button3_click(event) {send_Email ()}
//-----------------------------------------------------------------------------------------
function send_Email (parameter) {
let userId = wixUsers.currentUser.id;
let value1 = “test@test.com”
console.log(userId)
console.log(value1)
wixUsers.emailUser( "DPCform1" , userId, {
“variables” : {
“name” : $w( “#DPCname1” ).value,
“variable1” : value1,
“variable2” : “value for variable2”
}
} )
.then( () => {
console.log( "Triggered email sent" );
} )
. **catch** ( (err) => {
console.log(err);
} );
console.log(( "Job done!" ))
$w( '#DPCname1' ).show()
$w( '#TXT1' ).text= "Test-Mail successfully sent. Delivery in about 15sec."
setTimeout(()=>{$w( '#DPCname1' ).hide()}, 3500 )
}
//"variable2": "value for variable2"
what does this part mean?
$w('#DPCname1').show()
$w('#TXT1').text="Test-Mail successfully sent. Delivery in about 15sec."
setTimeout(()=>{$w('#DPCname1').hide()},3500)
Is it just to confirm that the message was successfully sent?