Help with Server-Side Form , Using DNN | Community
Skip to main content
Mikes_Jones
New Participant
May 5, 2015
Solved

Help with Server-Side Form , Using DNN

  • May 5, 2015
  • 11 replies
  • 5357 views
Hello,
 
Our website is using DNN and we are currently using a module within DNN to create forms. This form is linked to Marketo in the sense that when someone fills out a form on our site, certain team members are sent notifications.

However, what the form does not do is push the Marketo cookie when it is submitted, which means we are not able to track web activity for anyone who is filling out forms on our website.

I've read the guide for Server-Side forms but am still confused. I do not have much programming experience, but I was wondering

a) is anyone else using DNN and has been able to successfully link a Marketo form so that munchkin/marketo cookie passed on Submit?
b) anyone have a simpler explanation than the walkthrough?

If it helps, this is where our form is located: http://www.r2integrated.com/contact/contact-us


 
Best answer by SanfordWhiteman
"Name-Value Pairs" simply means if the field's API name is MyField__c, your url-encoded POST body contains

...&MyField__c=theValueForMyField&...

I disagree with @Josh in that Filled Out Form activities will be generated for successful server-to-server form POSTs.  However, I'm not sure I advise you continuing to build out the server-side code if you're unfamiliar with this kind of architecture in .NET.  Not only might you create difficult-to-maintain code, you can open security holes on your server by not properly validating form data.  You have to code defensively, even if it seems like you're just "passing through" the data to Marketo's servers.

I'm not trying to scare you here, I just wonder if the server-to-server is the best thing for most people who try it.  I especially dislike the 30-posts-per-minute limit.  Because of that limitation, if I were in your shoes, even though I write server code too, I would likely try to do this all on the client (browser) side.  For example, in the onSubmit handler for your DNN form you could embed a Marketo form, add hidden fields to it, and submit it to Marketo, all silently, and submit it to the .NET form at the same time.

11 replies

Mikes_Jones
New Participant
May 11, 2015
Thanks Sanford - will reach out via the link you provided once I get the issue resolved with Marketo regarding the "Embed Code"
August 11, 2015

Hi Malik,

Hopefully you already found your answer, but just in case here's an alternate way to find the form_id value for a form. If I choose the "embed form" option in Marketo, I see the following code:

//<script src="//app-xx00.marketo.com/js/forms2/js/forms2.min.js"></script>

//<form id="mktoForm_1073"></form>

//<script>MktoForms2.loadForm("//app-ab03.marketo.com", "xxx-xxx-xxx", 1073);</script>

In my case, the id of the form I'm looking at is identified as 1073.

If you visit the form you'd like to use for POST capture and click "edit", you'll be bounced to an edit page with a URL that looks like this:

app-xx00.marketo.com/m#FOE1073

In this case, the #FOE1073 is the interesting part - your form_id value is visible here as the four-digit number at the end of the URL, which is again 1073.

Hope this helps!

Mikes_Jones
New Participant
August 12, 2015

Thanks for the help @Amelia Mango​ !

SanfordWhiteman
New Participant
May 11, 2015
(Now that we know the Community may be down for a while, you definitely should contact me offline.)
SanfordWhiteman
New Participant
May 11, 2015
The ability to embed might not be available in Spark edition, if that's what you have... I'd open a case for that to make sure. 

If you can get this part resolved I can help you do the rest as it would be good to create a generic form-to-form framework -- contact me here.
Mikes_Jones
New Participant
May 11, 2015

Sanford - yes, I'm using Forms 2.0, I even created a new Form 2.0 to test it. I right clicked the form and I do not see an Embed option, nor is there an option for Embed under "Forms Action". I'm also an admin user incase you are wondering.

Attached is a screenshot.


SanfordWhiteman
New Participant
May 11, 2015
Are you using a Forms 2.0 form?  "Embed Code" should be there both if you right-click and if you go under Form Actions (on the right side pane).
Mikes_Jones
New Participant
May 11, 2015
Sanford, you're a true MVP, thanks for the link.

However, pertaining to step 3 - I do not see an option in my Marketo instance to "embed code" when I right click a form, is this a feature that was removed or changed?
SanfordWhiteman
New Participant
May 7, 2015
From the Forms 2.0 docs
Mikes_Jones
New Participant
May 7, 2015
Sanford - where can I get a better understanding of setting this up on the client side?
SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
May 6, 2015
"Name-Value Pairs" simply means if the field's API name is MyField__c, your url-encoded POST body contains

...&MyField__c=theValueForMyField&...

I disagree with @Josh in that Filled Out Form activities will be generated for successful server-to-server form POSTs.  However, I'm not sure I advise you continuing to build out the server-side code if you're unfamiliar with this kind of architecture in .NET.  Not only might you create difficult-to-maintain code, you can open security holes on your server by not properly validating form data.  You have to code defensively, even if it seems like you're just "passing through" the data to Marketo's servers.

I'm not trying to scare you here, I just wonder if the server-to-server is the best thing for most people who try it.  I especially dislike the 30-posts-per-minute limit.  Because of that limitation, if I were in your shoes, even though I write server code too, I would likely try to do this all on the client (browser) side.  For example, in the onSubmit handler for your DNN form you could embed a Marketo form, add hidden fields to it, and submit it to Marketo, all silently, and submit it to the .NET form at the same time.
Mikes_Jones
New Participant
May 5, 2015
Thanks Josh.

Referring to this guide: http://developers.marketo.com/blog/server-side-form-post/

I'm lost at step 5 and after.

I exported the field names, but don't quite understand the "name-value pairs".

Also for step 6, "Decide hich Fields to POST", does anyone have an example of what this might look like?

Thanks.