The submit button is disabled initially so the LMFX capture is not working. Once the submit button is enabled, there is an inline code that takes priority before our code. Our code does not fire because of that resulting in leads not being captured.
Added a code to fire the LMFX on hover of the mouse to the submit button. This allows us to fire our LMFX capture function before the inline code fires.
<script>
(function() {
document.addEventListener('mouseover', function(event) {
if (event.target.tagName === 'BUTTON' && event.target.classList.contains('submit-button')) {
var my_form = event.target.closest('form');
mcfx('capture', my_form);
}
});
})();
</script>
The lead was captured.