SOLVED

Re: How approve or disapprove someone who is registered in our event

Go to solution
Dan_Stevens_
Level 10 - Champion Alumni

Re: How approve or disapprove someone who is registered in our event

Don't worry, Greg, you never made it into our DB.  You're definitely not contained in the program that I'm working on.  If you want to PM me your email address that you used, I can check that as well.

Dan_Stevens_
Level 10 - Champion Alumni

Re: How approve or disapprove someone who is registered in our event

Thanks for looking into this, Greg.  The issue I had was the hidden values weren't contained in the "view source" code, but were contained using the browser's developer tools.  Not sure why that it is.

Now we just need to insert the lead's first name in the sentence.  I tried using the suggestion from Sanford Whiteman, but I'm not sure I implemented it properly (Marketo is also adding CDATA code within the script - so perhaps that could be the culprit).

Image 4.png

SanfordWhiteman
Level 10 - Community Moderator

Re: How approve or disapprove someone who is registered in our event

The CDATA wrapper isn't affecting it -- see my response to your other question.

Dan_Stevens_
Level 10 - Champion Alumni

Re: How approve or disapprove someone who is registered in our event

I still can't get this to populate.  Do you see anything wrong in the code below?  Here's what I have in the HTML snippet on the landing page (which appears after the form code within the HTML):

<script type="text/javascript">

MktoForms2.whenReady(function(form){

  form.getFormElem()[0].querySelector('#showEmail').innerHTML = form.getValues().Email;

})

</script>

And here's the rich-text:

Please confirm your approval for <span id="showEmail"> </span> to attend the event.

Here's the page again for reference:

https://pages.avanade.com/Template---Roadshow---Head-Space-Event-Approval_approved.html?EmailAddress...

SanfordWhiteman
Level 10 - Community Moderator

Re: How approve or disapprove someone who is registered in our event

You didn't put the <SPAN id="showEmail"> inside the form, so that's why it wasn't finding it.

It doesn't actually have to be inside the form, I guess, so change to this:

MktoForms2.whenReady(function(form){

  document.querySelector('#showEmail').innerHTML = form.getValues().Email;

})

Dan_Stevens_
Level 10 - Champion Alumni

Re: How approve or disapprove someone who is registered in our event

You're a genius, Sanford Whiteman​!  The value you bring to this community is enormous!

Grégoire_Miche2
Level 10

Re: How approve or disapprove someone who is registered in our event

Agreed

SanfordWhiteman
Level 10 - Community Moderator

Re: How approve or disapprove someone who is registered in our event

Thanks guys!

Grégoire_Miche2
Level 10

Re: How approve or disapprove someone who is registered in our event

Hi Dan,

As the page is untracked, using tokens will not be possible. And no Marketo function would enable to do what you want.

So I gather that this would require some javascript coding to extract the 2 informations from the URL and display them in the page.

More something for Sanford Whiteman​ than for me

-Greg

SanfordWhiteman
Level 10 - Community Moderator

Re: How approve or disapprove someone who is registered in our event

Yeah, you could use hidden fields (thus using Marketo's existing querystring parser) and then use form.getValues() to read the values and display them anywhere else.