/
Sending data directly
Sending data directly
The Send2CRM client provides functionality to take data from HTML forms, but also allows sending submissions directly. This is useful for sending any data that does not directly use a form, or where the form is too complex for automatic processing.
let formData = {
firstName: 'John',
lastName: 'Smith',
email: 'johnsmith@example.com',
};
send2crm.forms.send('UNIQUE_FORM_ID', formData)
.then((data) => {
// Successful response.
})
.catch((error) => {
// Failed :-(
});
The return value for successful sends is the same as supplied to form events, but with the values
property removed. If the visitor was successfully identified, a visitorId
property will also be set.
{
"isSuccess": true,
"error": "",
"visitorId": ""
}
, multiple selections available,
Related content
Custom form submit handler
Custom form submit handler
More like this
JavaScript form submit listeners (technical)
JavaScript form submit listeners (technical)
More like this
JavaScript client
JavaScript client
More like this
Attaching forms
Attaching forms
More like this
Forms
More like this
Minimum website form
Minimum website form
More like this