| | #1 |
| Niche Experimenter War Room Member Join Date: 2010 Location: London
Posts: 73
Thanks: 50
Thanked 41 Times in 21 Posts
|
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 |
|
My blog: NicheExperiments.com | |
| |
| | #2 |
| Design Warrior War Room Member Join Date: 2012 Location: Phuket, Thailand
Posts: 154
Thanks: 69
Thanked 85 Times in 72 Posts
|
if it's a WP site, install a plugin called: URL Params
|
| | |
| |
| The Following User Says Thank You to KillerJVs For This Useful Post: |
| | #3 |
| Web Developer War Room Member Join Date: 2012 Location: Vancouver, BC
Posts: 593
Thanks: 149
Thanked 162 Times in 133 Posts
|
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']; ?>"> |
| |
| |
| The Following User Says Thank You to Andrew H For This Useful Post: |
| | #4 |
| Niche Experimenter War Room Member Join Date: 2010 Location: London
Posts: 73
Thanks: 50
Thanked 41 Times in 21 Posts
|
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 ![]() |
|
My blog: NicheExperiments.com | |
| |
| | #5 |
| TNT Join Date: 2012 Location: florida
Posts: 65
Thanks: 19
Thanked 5 Times in 5 Posts
|
you could also use php session and have it save the post data and then echo it into the form field
|
|
If everyone knew everything the world sure would be irritating
| |
| |
| | #6 |
| Active Warrior Join Date: 2013 Location: Turkey
Posts: 65
Thanks: 0
Thanked 3 Times in 3 Posts
|
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
|
| |
|
| Bookmarks |
| Tags |
| auto, fill, form, optin |
| |