It's the only <button> that has class sendButton:
ftfRoot.querySelector("button.sendButton")
Hey @SanfordWhiteman ,
Thank you for your help with this. The blog post is great! I'm trying this out but have a couple of questions (apologies if they don't make sense, I'm very new to Velocity scripts and trying to get my head around it):
1. can I add a new field to the Forward to a Friend form? We operate across multiple jurisdictions and need to capture where the friend is from.
2. in regards to the methodology, you explain that:
"The key is to add a Velocity token (you can add it anywhere in the email) that contains <script> and <style> enhancements."
I'm not able to edit the code of my email because we use dynamic content. I tried hyperlinking the text with the token I created but when I received the email the text was no longer hyperlinked:
"But you only want this token to output in View as Web Page view. (Forward to Friend also uses that view, just adding a form on top.)"
How do I get this token to output in View as Web Page view?
Thank you so much!
1. You can’t add another field while using the standard FtF form.
2. You don’t want to put this special markup anywhere in the standard body of your email, so the fact that you’re using dynamic content doesn’t matter. I’d usually add it to the template, perhaps with a mktoBoolean to switch it on or off.
3. View as Web Page view is already targeted in the sample token, using the condition at the top:
#if (!$mktmail.DefaultTrackingHost)
Thank you so much @SanfordWhiteman - very helpful answers!
1. In this case, I will update jurisdiction based on (sign up) form completion - because if the friend doesn't actively sign up using a form, he/she remains unsubscribed in our instance
2. I don't have enough knowledge of html to create a mktoBoolean, so I will need to outsource this but thanks again!