5 replies
Hi there,

I have a slightly complicated question to ask (well, complicated for me anyway, you might find this different )

This is what I am looking for...

I would like to have some javascript/php that takes the parameters from the URL and autofills a webform with this information.

For example,
the URL: http://site.com?Email=me@email.com
Would send someone to site.com which has a webform with the email address auto-filled with the value from the URL.

I use Infusionsoft and it works on their hosted forms but not when I use OptimizePress or OptimizePress2.

The real reason for doing this is so that I can have hidden fields in the form (like leadsource or advertising vendor) and put them in the hidden fields. This would help enormously with tracking, etc.

Any help would be really appreciated...

Thanks

Pete
#auto #fill #form #optin
  • Profile picture of the author KillerJVs
    if it's a WP site, install a plugin called: URL Params
    Signature
    {{ DiscussionBoard.errors[8379872].message }}
  • Profile picture of the author Andrew H
    Are you able to use PHP on this page? If so, it's simple.

    You can use $_GET[] to get the variables from the URL. So you could do something like this:

    Sample URL: yourwebsite.com?refid=23

    Code:
    <input name="tracking" type="hidden" value="<?php echo $_GET['refid']; ?>">
    PHP: $_GET - Manual
    Signature
    "You shouldn't come here and set yourself up as the resident wizard of oz."
    {{ DiscussionBoard.errors[8380036].message }}
    • Profile picture of the author Peterdeg
      Thanks Andrew H & KillerJVs,

      I tried both but there was another issue which I didn't mention in the original post (mainly because I hadn't found it). The issue was that when you put your optin code into OptimizePress it creates it's own form but doesn't take through the values (or the placeholders) so the code is lost.

      However, when I took the page source of the table it creates and put it back in as HTML with your edits both versions worked. So, thanks again
      Signature
      {{ DiscussionBoard.errors[8388895].message }}
  • Profile picture of the author otfromtot
    you could also use php session and have it save the post data and then echo it into the form field
    {{ DiscussionBoard.errors[8392761].message }}
    • Profile picture of the author webprogramzone
      If you are using custom script then you should add your self otherwise for the any cms you have to search for the plugin for it
      {{ DiscussionBoard.errors[8398834].message }}

Trending Topics