- This topic is empty.
-
AuthorPosts
-
May 1, 2016 at 3:14 pm #241140EhreekuhParticipant
So I have been tasked by my boss to try and figure out how to autofill a field in a form with the email address that received the link that was clicked.
Back story:
We are sending out links to an online scheduler and parents must use the email address at which they received the link (which is the same one tied to their child’s profile) to be able to book their child into an extra help session. Most of the parents either don’t read the directions we give them or just simply don’t understand. SO, we want to the email address in the form to auto populate with the email address that the link was clicked on..from..or whatever.I hope this makes sense, I am not versed in the CSS/HTML world and I am mostly self taught to keep my boss happy and expand my knowledge for self-satisfaction.
Thank you SO much for looking at this post, I appreciate your time!
Keep it Rockin’,
EhreekuhMay 1, 2016 at 9:44 pm #241146I.m.learningParticipantSounds like PHP.
I use PHP to include my header so I only have to change 1 page and not every single page.
<?php
$emailMap = array(“firstname1lastname1″=>”[email protected]”,
“firstname2lastname2″=>”[email protected]”); ?><input type=’text’ name=’emailTo’ value='<?= isset($emailMap[$_GET[“email”]])?$emailMap[$_GET[“email”]]:””) ?>’/>
May 2, 2016 at 1:19 am #241153BeverleyhParticipantLet me see if I understand;
- You send out an email to parents
- Email contains link to book a help session
- You want the link that they click on (in the message body of the received email) to auto-populate the email field of the help session booking form
Is that right?
You could do it if you have control of the email sending script and the session booking form page.
You could first edit the email sending script so that the link to the session booking page/form contained in the message body, has their email address appended as a query string;
http://mywebsite.com/[email protected]
Then at the top of the form page, use PHP to GET the query string (the email) and auto-populate the form field for the email address;
<?php $email_from_link = isset($_GET['email']) ? $_GET['email'] : '';?>
And for the form field – populate the ‘value’ attribute;
<input type="text" name="email" value="<?php echo $email_from_link;?>">
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.