Hi, I have reviewed the API examples and I am unable to create the simple js for a feedback form. There are no examples of this in the API examples, but the closest it appears is creating a new contact. So I tried this, but adding the field for message, which is in my Contact Info and the actual form, was not accepted in the JS for this page.
$w . onReady ( function () {
$w ( “#button1” ). onClick (() => {
wixCrm . createContact ({
“firstName” : $w ( “#input1” ). value ,
“lastName” : $w ( “#input2” ). value ,
“emails” : [ $w ( “#input3” ). value ],
“message” : [ $w ( “#textBox1” ). value ]
})
. then (( contactId ) => {
wixCrm . emailContact ( “thankyou” , contactId , {
“variables” : {
“firstName” : $w ( “#input1” ). value ,
“lastName” : $w ( “#input2” ). value
}
});
});
});
});
The “message” line generates an error that it is not in Contact Info, yet it is.
Do you have a simple customer feedback API example to add?