TUTORIAL REQUEST: URL Parameters in visible fields and/or HTML | Community
Skip to main content
Robb_Barrett
Level 10
July 1, 2014
Solved

TUTORIAL REQUEST: URL Parameters in visible fields and/or HTML

  • July 1, 2014
  • 14 replies
  • 4392 views
Hello all,

I'd like to build a confirmation page.  To do this, I have a link in an email.  They click on the link and it takes them to a page where it askes to confirm name and email (passed via parameters).

I've read through everything I can find on this site and none of the articles seem to work.  Does anyone have a working model they can share, or explain the process?
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Justin_Cooperm2
Hey Robb,

I can't go through your whole page, but I tested out this simple example and it works fine:



Good luck!

Justin

14 replies

July 2, 2014
You added a # to the span IDs, remove that and try.
July 2, 2014
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript">
if (/[?&]CPSRefSiteName=/.test(location.href)){
$("#sitename").text(getUrlVar('CPSRefSiteName'));
} else {
$("#sitename").text('Fallback Text'); }
if (/[?&]CPSRefSiteEmail=/.test(location.href)){
$("#siteemail").text(getUrlVar('CPSRefSiteEmail'));
} else {
jQ("#siteemail").text('Fallback Text'); }
</script>
 
<p>You selected <span id="sitename"></span>. Please click Confirm to send a note to <span id="siteemail">.</p>


Try this exactly.
Robb_Barrett
Level 10
July 2, 2014
Sorry to bug you again Justin....

The coode works great, but when I put a form on the page it quits working.  I took the HEAD part and put it on the page headers and it worked fine, then I put the form in and it quit working.
Robb Barrett
Robb_Barrett
Level 10
July 10, 2014
Bumping on this.  This works when I put it in as an HTML block but when I put a form on the page as well it doesn't work.  Any thoughts?  Do I need to submit this as a ticket?
Robb Barrett