Hi
I am making use of the excellent web-to-lead facility and instructions using web browser only code (https://docs.espocrm.com/administration/web-to-lead/)
Working fine for "standard" fields, but I want to capture both home and phone fields.
I've adjusted the form to do so, but I am not sure of the syntax/format to use for the payload in the script.
E.g.
But my guess for phoneNumber['Home'] doesn't work
I can't trace in the forum or documentation how to reference a list item in a field
Any help please ?
Many thanks.
I am making use of the excellent web-to-lead facility and instructions using web browser only code (https://docs.espocrm.com/administration/web-to-lead/)
Working fine for "standard" fields, but I want to capture both home and phone fields.
I've adjusted the form to do so, but I am not sure of the syntax/format to use for the payload in the script.
E.g.
var payloadData = {
firstName: webToLeadFormElement.firstName.value,
lastName: webToLeadFormElement.lastName.value,
emailAddress: webToLeadFormElement.emailAddress.value,
phoneNumber['Home']: webToLeadFormElement.phoneNumber.value
phoneNumber['Mobile']: webToLeadFormElement.mobileNumber.value
};
firstName: webToLeadFormElement.firstName.value,
lastName: webToLeadFormElement.lastName.value,
emailAddress: webToLeadFormElement.emailAddress.value,
phoneNumber['Home']: webToLeadFormElement.phoneNumber.value
phoneNumber['Mobile']: webToLeadFormElement.mobileNumber.value
};
I can't trace in the forum or documentation how to reference a list item in a field
Any help please ?
Many thanks.
Comment