Fix the bug for tokened radio button values

Fix the bug for tokened radio button values

DON'T TEST THIS ON A LIVE FORM

If you create a Radio Button field on a form and tokenize the value (not the field label), the radio button field disappears making further modifications to the field impossible.  

Now, the good news is that the token will work but you'll never be able to edit the field again.  It becomes practically invisible.

We found this out trying to create an efficiency with our Preferences (GDPR) button on our forms. Changing the language meant changing dozens of forms so we thought tokenizing the front-end value would make changing the language easier in the future.  Which it did, but after approving the form the field disappears when you open it back up in the editor (although it's still on the form when you view it.)

Engineering is aware of this issue. Their answer is "don't do it." However, it would be really nice if we could do it.

4 Comments
SanfordWhiteman
Level 10 - Community Moderator

Robb, {{my.tokens}} aren’t properly escaped to serve as any form field values in Marketo (they need to be both JSON-escaped and HTML attribute-escaped, but they are not).

You may not have run into a problem with other datatypes/values, but the form descriptor breaks with any tokens crafted in such a way as to make bad JSON.

I have a blog post coming up that deals with how to use tokens in a safer, more portable way for various parts of the page.

Robb_Barrett
Marketo Employee

Yeah, and my suggestion is that they look for a way to fix it.

SanfordWhiteman
Level 10 - Community Moderator

But I'm saying it's not specific to labels or values or any datatype. It's a lack of escaping so the Idea would benefit by being generalized.

kh-lschutte
Community Manager
Status changed to: Open Ideas