Do tokens still work in form fields? | Community
Skip to main content
Stefan_Gassner
Level 2
December 19, 2019
Question

Do tokens still work in form fields?

  • December 19, 2019
  • 4 replies
  • 5392 views

I'm trying to put in the company token into one of my form field labels. 

When I go to test it using the usual smart campaign test, the token displays instead of the intended marketo data or default setting. 

Anyway to test whats wrong here? 

I've tried removing and re-inserted the token and using another one with the same problem. 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

SanfordWhiteman
Level 10
December 19, 2019

Yes, if the Munchkin session is associated and it's a Marketo LP/

Stefan_Gassner
Level 2
December 19, 2019

Weird, the munchkin is assocated and the page is on Marketo. 

Is there anyother way we can test why its not showing? 

SanfordWhiteman
Level 10
December 19, 2019

How do you actually know it's associated (since token substitution is one of the ways to prove the session is associated)?

Are Visit Web Page activities tracked to the lead, if you open the page in an Incognito/Private window?

Stefan_Gassner
Level 2
December 19, 2019

It's tracking the email clicks on both leads emails (different devices), but only registers the page view for one of the leads?

this is what displays.. 

SanfordWhiteman
Level 10
December 19, 2019

Email clicks (Clicked Email activities) don't use Munchkin at all, so that wouldn't establish that the browser session is associated.

If it's only seeing the Visit Web Page for one of the leads, and you're starting from a new Incognito window each time, on the same machine -- that makes very little sense. I suspect you forgot to close down all your Incog windows between tests or something like that.

In any case, though, you're not really using the tokens in a form field, but rather in the label of a field. I don't think that's ever worked. Of course it's possible to simulate that effect by creating a placeholder <span> in the label and then filling it from the token output elsewhere in the page, though.

Stefan_Gassner
Level 2
December 19, 2019

Thanks Sanford, 

Thats what i was trying to get at, but I did mention I was trying to fill the Label. 

Would i use some sort of JS to get the token into the <span> holders? 

SanfordWhiteman
Level 10
December 19, 2019

Actually, in my tests tokens do work in labels, too. Again, that's if the session or pageview is associated.

I think your problem is with the Munchkin association, not with tokens. Try outputting tokens in the page body, that too requires association.

Stefan_Gassner
Level 2
December 19, 2019

The tokens work properly on the page body and the heading, but it still doesnt work inside the forms.. 

Not too sure whats going on with it. 

Casey_Grimes2
Level 10
December 19, 2019

Agree with Sandy that this should work as expected if the form is on a Marketo LP for labels and the like, but one minor word of caution for the token-happy/anyone stumbling upon this later: while you can also place tokens in other parts of a form, such as with picklist values, know that using them there can cause some glitches within the form editor UI due to the way that's set up.