Looking for a Good Structure for Universal Forms

Anonymous
Not applicable

Looking for a Good Structure for Universal Forms

I have been told about the Universal Form capabilities in Marketo and would like to work on implementing these in the new year as part of our streamlining efforts.

Assuming they require some Javascript code to help them work, I was wondering if anyone has any information on how best to structure the form itself and the Java for optimum use.

I have not been able to find product documentation on the Universal Forms so if anyone has additional resources to help educate myself and the team, it would be much appreciated

Thanks in advance!

Tags (2)
6 REPLIES 6
Mike_Reynolds2
Level 10

Re: Looking for a Good Structure for Universal Forms

Hi Michelle Chopin​,

Can you tell me what you're referring to with Universal Forms? It may just be a terminology difference so I'm curious what you're referring to.

Anonymous
Not applicable

Re: Looking for a Good Structure for Universal Forms

Hey Mike,

That might be why I can't find any product information on it!

My boss had mentioned Universal Forms in the sense of having a single form across all landing pages that adapts to the lead source/lead source detail, using Javascript to ensure it works that way.

Does that help? I am still fairly new to Marketo so am unfamiliar with this feature to date, so forgive me if I'm not referencing something correctly!

Michelle

Mike_Reynolds2
Level 10

Re: Looking for a Good Structure for Universal Forms

Michelle,

Marketo doesn't have any out of the box features that would do this since it would require some custom Javascript to do it. but, some of the folks here in the Community may have done this in the past and may have some sample JS code they could give as an example.

Marketo forms can be placed on any landing page in Marketo, but you can also use Marketo forms on your own website by using the form's embed code​. When you create the form, if you make it in the Design Studio,it will be accessible across your Marketo instance, so if you're planning to use the same form in multiple places, that may be the best place to initially create the form.

As an alternative to the custom JS, if your goal is to capture lead sources, you can do that through hidden form fields that capture URL parameters. Here's a Support KB doc I wrote that shows the details on how to do that: Tracking Lead Sources

Anonymous
Not applicable

Re: Looking for a Good Structure for Universal Forms

Hey Mike,

We currently use the Marketo forms embedded into our WordPress landing pages (we don't use the Marketo landing pages at all), including the use of hidden fields. These are great currently as we have one form per piece of content or landing page and it attributes the correct lead source and lead source detail.

We were hoping to use a single form that, regardless of the page it is embedded on, will be able to pull the correct lead source/lead source detail information depending on the content/asset on that page. Now that I think about it, this might be something we can use alongside our plan to streamline our landing pages so that UTM codes drive that detail (also using Javascript).

I will do some digging around for custom Javascript to see if anyone has been able to use a single form that adjusts according to the landing page it is used on. Perhaps someone with that knowledge/experience will stumble across this thread!

Thanks for the insight and awareness on that feature (or lack thereof).

Michelle

SanfordWhiteman
Level 10 - Community Moderator

Re: Looking for a Good Structure for Universal Forms

Michelle, the pattern -- not so much a feature -- is usually called global form(s): forms stored outside of programs on the Marketo side so they can be shared as needed.  It's a best practice for remaining sane.

You're right that sometimes JS touchup is necessary to get lead source + source detail into the stored data, but not always.  As Mike points out, if the URL of the landing page hosting the form has identifying URL params (UTM or otherwise) those values can be read directly into hidden form fields using the Autofill setting, without any JS.  Similarly, if you are already storing the values you want in cookies, Autofill can read those values without any code.

However, if the values you want do not directly translate to URL params (for example, if the values come from the document path rather than the query string) or if the LP hosting the form is deeper into the site than an initial page that has the params, or other more complex needs, you will need some code.  (In the first case, the Forms 2.0 API can be used to read from document.location before setting the value of a lead field; in the second case you can copy the params into cookies on the initial LP and then use Autofill to read the cookies on the page with the form.)

The Forms 2.0 API can also be used for a wide range of per-LP customizations as well, for example precision tweaks to Known Lead HTML or Thank You URL navigation.  But you may find that using Add Choice in the form's settings, together with tokens and smart flow steps on the back end, suffices for your needs.  I tend to dive directly into JS especially because it means that less privileged users can't change accidentally mess things up.

Marketo's Kristin Carmean went over some related concepts here:

Embedding Global Forms without Losing Tracking: Part I

Embedding Global Forms without Losing Tracking: Part II

Anonymous
Not applicable

Re: Looking for a Good Structure for Universal Forms

Many thanks for all the details Sanford!

This sounds like an item we should tackle along with our landing page clean up as we want to use UTM codes solely to drive lead source and lead source detail (currently we have to have a single landing page per piece of content or medium that we are using the form on).

Thanks for the clarification on the "feature" - we will definitely look further into this as we get going on this project.

Happy New Year!