Error getting form forwarding urls. Form not saved.

Anonymous
Not applicable

Error getting form forwarding urls. Form not saved.

Hey, 

I have embedded a couple marketo forms on my site and when trying to post the forms i get this error:

error: true
errorCode: 500
message: "Error getting form forwarding urls. Form not saved."

The forms are embedded on the site using the "normal" -embed type and are set to stay on the page after submitting the form. Please help. 🙂
EDIT: It seems that this only happens inside our companys local network, when i try it on my own phone the forms work fine.


 
Tags (1)
12 REPLIES 12
Kenny_Elkington
Marketo Employee

Re: Error getting form forwarding urls. Form not saved.

Hi Otto,

I'd recommend you take a look at this with your IT resource, it's like that there's an issue with your local DNS or firewall preventing some network request from executing properly.
Anonymous
Not applicable

Re: Error getting form forwarding urls. Form not saved.

Hi there, I feel like this is a server side error. I am having a hard time believing there is any way a local network config could cause a marketo server to return a 500 error (internal server error) with the message "Error getting form forwarding urls.  Form not saved." My suspicion is supported by the fact I have tried submitting 2 different forms from 3 different networks (my phone mobile network via tethering, home wifi, and work wifi). Same result everywhere. In addition, there was a point where it was working perfectly, and I changed nothing, and now it doesn't work. I receive this error whether I use the official JS snippet they give you (directly embedding the Marketo form in the page), or build a form myself in JS (according to the documentation) and try to submit it that way.

SanfordWhiteman
Level 10 - Community Moderator

Re: Error getting form forwarding urls. Form not saved.

Please post a link to your form embed code.

Anonymous
Not applicable

Re: Error getting form forwarding urls. Form not saved.

Hi there, thanks for the quick reply. Here is the embed code

<form id="mktoForm_1038"></form>

<script>MktoForms2.loadForm("//app-sj16.marketo.com", "825-DUM-524", 1038);</script>

And here is the custom JS I tried as well. The idea here is that I transplant the data from a styled form on our page (dummy_form) into a Marketo form and submit. This is the implementation I will eventually have to go with as we have to attach some custom hidden fields to the form, but in this example I am not attaching any hidden fields, only filling out the existing form fields. When trying this method, I made sure to comment out the above official snippet in case there was any conflict. Here is a pastebin link if you would rather view it formatted / syntax highlighted.

function validateAndSubmit(dummy_form){

    var valid = true;

    if( !validator.checkAll( dummy_form ) ) {

        valid = false;

        console.log('validation failed');

    }

    if( valid ) {

        console.log('validation success');

        MktoForms2.loadForm("//app-sj16.marketo.com", "825-DUM-524", 1038, function(form){

            form.vals({

                'FirstName': dummy_form['First Name'].value,

                'LastName': dummy_form['Last Name'].value,

                'Email': dummy_form['Email Address'].value,

                'Phone': dummy_form['Phone Number'].value,

                'Company': dummy_form['Company Name'].value,

                'Website': dummy_form['Website'].value

            });

            form.onSuccess(function(values, followUpUrl) {

                // prevent redirect to any followup URL

                console.log('form submitted');

                return false;

            });

        });

        MktoForms2.whenReady(function (form) {

            console.log(form);

            console.log(form.vals());

            form.submit();

        });

    }

}

No matter which method I use (the copy pasted HTML/JS snippet, or my own implementation), here is the error I get: http://puu.sh/n4aFR/876adcd145.png

Screen+Shot+2016-02-11+at+9.45.48+AM.png

Here is a screenshot of the console logs produced by the custom JS implementation. You can see the Marketo form object being printed out, the form.vals() printing out just fine, but then the 500 error like above. As you can see, the required fields (munchkinId and formid) are set: http://puu.sh/n4aB9/0e1ab271f0.png

Screen+Shot+2016-02-11+at+9.44.39+AM.png

Thanks in advance

SanfordWhiteman
Level 10 - Community Moderator

Re: Error getting form forwarding urls. Form not saved.

Can't replicate this with your form.

Try it yourself here: MktoForms2 :: Form Forwarding URLs (nation.marketo.com/thread/5830)

pastedImage_1.png

pastedImage_2.png

Anonymous
Not applicable

Re: Error getting form forwarding urls. Form not saved.

Yeah, that works for me. It also works on a Marketo landing page. However, here is that exact form on my site, not working.

Screen+Shot+2016-02-11+at+5.33.30+PM (1).png

Does it have anything to do with the fact I am developing this locally (on localhost)? That ideally shouldnt effect anything, but it might be?

SanfordWhiteman
Level 10 - Community Moderator

Re: Error getting form forwarding urls. Form not saved.

Works for me from localhost as well.

Can you send me the entire contents of your page?  There must be something else in play.

Anonymous
Not applicable

Re: Error getting form forwarding urls. Form not saved.

Hey there, I deployed the page to a testing server and it works just fine using either method from above, and both are still broken on localhost. I am not too concerned with what is going on now as I know once the page is in production everything will be fine. If it worked in localhost for you as well, I am especially not concerned. Thanks for the help

SanfordWhiteman
Level 10 - Community Moderator

Re: Error getting form forwarding urls. Form not saved.

OK.  I too would not be concerned about the live form.  Perhaps there's some outbound proxy messing with the form post, since it's not the use of localhost alone that's causing it.