The request is to capture the same form but use different form mapping depending on the value submitted. The problem is it is in the same page but uses the same form, so there is no unique identity you can use to map it to different mapped form.
Created a custom code to add a unique identifier to the form to use for the form mapping depending on the selected value using onFormCapture.
<script>
mcfx(function(t) {
t.configure("onFormCapture", function(form) {
var dataPrefix = form.getAttribute('data-prefix');
if (dataPrefix) {
switch (dataPrefix) {
case 'EAMGeneralInquiry_':
form.id = 'rcfx-custom-id-general-inquiry';
break;
case 'EAMMachineQuotesInquiry_':
form.id = 'rcfx-custom-id-machine-quotes';
break;
case 'EAMStrapQuotesInquiry_':
form.id = 'rcfx-custom-id-strap-quotes';
break;
case 'EAMPartsQuotesInquiry_':
form.id = 'rcfx-custom-id-parts-quotes';
break;
case 'EAMServiceManualsInquiry_':
form.id = 'rcfx-custom-id-service-manuals';
break;
}
}
});
});
</script>
The lead is captured with the correct mapped form using the selected value in the form.