We've come across the need (twice now) to implement some validation/formatting code
after the submittal of a form (or as the last step before an email send). There does not seem to be a way to access that portion of the landing page (or email) code.
Our two biggest issues are:
Phone number formatting. We have Salesforce rules that say a phone number must be formatted such as (xxx)xxx-xxxx. The solution proposed here:
http://community.marketo.com/MarketoArticle?id=kA050000000L3eqCAC is severly flawed in that, if a user adds their own dashes, the code cuts the phone number up to resemble: (xxx)-x-xx-xxx-x, which is even worse than no formatting at all. AND it does not account for auto-fill data saved in some browers.
We have custom code that worked on our own landing pages prior to Marketo that would format the number upon submittal of a form. We no longer have the means to implement that code to run a validation/formatting behind the scenes after the user clicks submit and prior to entering it into our lead database.
Additionally, we use tokens in our emails that are in integer form. Since Marketo integer fields do not accept commas (as Salesforce does), I thought a good workaround would be to put some code in our email template that would format the number once Marketo has submitted/sent the email and changed the token to an actual number (there was helpful code linked to here
http://community.marketo.com/MarketoDiscussionDetail?id=90650000000PdJlAAK but I have nowhere to put it - it doesn't work if placed in the head tag).
In both situations I am wondering how do I access that final step (if it's even possible). What is Marketo's order of operations? These are two issues that have haunted our use of Marketo for months and we are at wits' end trying to come up with a solution. Any help is very much appreciated.