The form and all its elements have no name; therefore, the lead cannot be captured.
I created a faux form that loops through all the inputs and assigns it a custom name to be used for lead capture.
// Clone the form to leave the original form untouched
var originalForm = this.closest('form');
var formClone = originalForm.cloneNode(true);
var clonedFormId = 'mcfx_custom_id_contact_us'; // Fill this out please.
formClone.removeAttribute('id');
formClone.id = clonedFormId; // This removes the original ID and add a new ID that you can use as selector for Form
formClone.removeAttribute('class'); // Remove all classes from the cloned form
formClone.removeAttribute('name'); // Remove all classes from the cloned form
var formElements = formClone.querySelectorAll('input, select, textarea');
formElements.forEach(function(element, index) {
if (!element.getAttribute('name')) {
element.setAttribute('name', 'fx-id-' + index);
}
});
// Now, capture the cloned form
mcfx('capture', formClone);
console.log('MCFX capture success');
The lead was captured.
Ticket: Link