Forms 2.0 - raw form html embedding issues

Anonymous
Not applicable

Forms 2.0 - raw form html embedding issues

Due to how forms 2.0 work, I'm trying to create a template with the raw form code embeded in it. This way I can strip out all the unneccesary inline styling that is severly messing up my form. I've also left off the forms2.js as this further causes problems with the style. When I try to submit the form, it just reloads the page with the data appended to the URL as a query string.

I truly thought that if I created the page with the form in it, grabbed the form html and edited it to my liking, then created a new template/landing page with that form embeded in the template, that this would work. Since it's not, I thought I'd ask for help and have put together a few questions that will hopefully help me solve this issue.

1) Is this a possible solution?
2) Is the forms2.js file required?
3) Has anyone else determined a workaround for stripping out the unwanted inline styles without using css !important or jQuery/JS to accomplish this? In other words, can you do it this way or is the embed code/template form block required?

I'll happily add the raw form code I'm using, but I'm not sure how to create a code block in this editor and would rather not overload the page with a bunch of code unless requested.

I appreciate all help and thoughts about how to solve this problem!
Tags (1)
4 REPLIES 4
Anonymous
Not applicable

Re: Forms 2.0 - raw form html embedding issues

I created a case around this issue and after speaking with Ian, realized I was looking at this backwards. For anyone that wants complete customization control, all you need to do is create a form (original or 2.0), embed it in a landing page and grab the source html for everything betwee the <form></form> tags. Then, just add:

method="post" action="http://CNAME/index.php/leadCapture/save"

to the opening form tag, where CNAME is the subdomain of your Marketo instance. Then, add these lines after the closing form tag:
 
 
<input type="hidden" name="returnURL" value="YOUR_THANK_YOU_PAGE_URL">
<input type="hidden" name="formid" class="mktoField mktoFieldDescriptor" value="FORM_ID">
<input type="hidden" name="munchkinId" class="mktoField mktoFieldDescriptor" value="MUNCHKIN_ID">

Again, replacing the value attribute with the values of the form you created and your preferred thank you page (only if you want the form to redirect on submit). The form and munchkin ids should be accessible via the same page that you grabed the source form code from.

Now you can edit the form to your liking (removing all that extra code you may not want). We're hosting the pages as 'templates' on our Marketo instance where each 'template' corresponds to a landing page we've also created in Marketo. My understanding is that this form could be hosted elsewhere as well if you want to do that.

Hope this helps someone else! Forms 2.0 are great for what they are, but having the ability to fully customize your form is infinitely better!
Parker_Goran
Level 1

Re: Forms 2.0 - raw form html embedding issues

This was tremendously helpful. Thank you!

Rasmus_Bidstru1
Level 4

Re: Forms 2.0 - raw form html embedding issues

when calling http://app-lon02.marketo.com/index.php/leadCapture/save2

im getting a "No Subscription ID" error, any ideas?

Anonymous
Not applicable

Re: Forms 2.0 - raw form html embedding issues

Worked like a charm but I have one question. Now that you have placed the custom form and css on your landing page how do you specify that landing page in you smart list? ex. The web page doesnt show up in the "web page constraint" field anymore. I would like to reuse the form on multiple pages. Any thoughts?