Bad Request When Form Is Submitted Programatically

Anonymous
Not applicable

Bad Request When Form Is Submitted Programatically

Hi,

I have a marketo form which we use a third party script(experian) to verify the email address and physical address of the user filling out the form.  This script is run before the form is submitted, therefore, we added a few lines of code to the experian script to submit the form programatically after the experian script does its thing.

jQuery('.mktoButton')[0].form.submit(); 
jQuery('.mktoButton')[0].click();

However, after the experian script is run and the form is submitted looking in the console I'm getting a bad request:

POST http://app-sjl.marketo.com/index.php/leadCapture/save2 400 (Bad Request)

The form submits perfectly fine(running the lines of code in the console) if the experian script is not run first.  Do you have any reason what could be causing this bad request to happen.  Please let me know if you might need more info to diagnose this issue.

Thanks, 

 

Dan

Tags (1)
3 REPLIES 3
Anonymous
Not applicable

Re: Bad Request When Form Is Submitted Programatically

Is there any additional data or parameters being submitted via the server-side form post (when you run Experian script)?
Anonymous
Not applicable

Re: Bad Request When Form Is Submitted Programatically

Hi 

Sorry for the lateness on this. I'm still looking into the issue.  I noticed that when I submit the request I am missing a form ID and a munchkin ID.  I see in the console that a get request is made:

Navigated to http://****/?FirstName=test&LastName=test&Email=jon%40test.com&Company=test&Street=test&State=TX&City=test&PostalCode=77024&Country=US&Phone=2815014309&Specialty__c=Cardio+Vascular&comments__c=&formid=&munchkinId=

Do you have any idea why this might be happening or any ways I could somehow debug this?

Thanks,

 

Dan

Anonymous
Not applicable

Re: Bad Request When Form Is Submitted Programatically

Nevermind I have this figured out.  It was nothing on Marketo's end but rather a line in the script that removes the values of any hidden fields.

Thanks for your support
 

Dan