Aem form submission to Marketo | Community
Skip to main content
Level 3
Sep 12, 2022 5:18 AM UTC
Solved

Aem form submission to Marketo

Hi All,

 

We have  created form in sightly and we want to submit the data to Marketo.

Please anyone could tell me the approach on background submission to Marketo.

 

Thanks,

Mahesh

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Saravanan_Dharmaraj
Saravanan_DharmarajAccepted solution
New Participant
Sep 13, 2022 4:43 PM UTC

you can capture the form submission button click in javascript and do the submission by code and show the success/thank you message in place of form. Below is an example.

 

$('.marketo-form').on('click', '.mktoButton', function(event) {
event.preventDefault();
MktoForms2.whenReady(function(form){
//code to check values in form fields
form.submit();
form.onSuccess(function(vals,thanksURL){
form.getFormElem().hide();
$(".marketo-form").hide();
$(".thank-you").show();
return false;
});
});


});

 

1 reply

Saravanan_Dharmaraj
Saravanan_DharmarajAccepted solution
New Participant
Sep 13, 2022 4:43 PM UTC

you can capture the form submission button click in javascript and do the submission by code and show the success/thank you message in place of form. Below is an example.

 

$('.marketo-form').on('click', '.mktoButton', function(event) {
event.preventDefault();
MktoForms2.whenReady(function(form){
//code to check values in form fields
form.submit();
form.onSuccess(function(vals,thanksURL){
form.getFormElem().hide();
$(".marketo-form").hide();
$(".thank-you").show();
return false;
});
});


});

 

Translate