Email to online form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a link in an email that opens up an online form for people to
complete. There is a drop down list on the online form that people must make
a selection from. Is there anyway I can have the link in the email make the
selection automatically, or somehow prefill a text box. I am trying to do
this because of user error and people choosing the wrong selection.

Any help or suggestions is most appreciated.

Thank you.
 
On a straight url, you can 'embed' (for lack of better term)
the form information as a query string (eg
www.domain.com?fieldname=value) or if using an html email
you can make a form on that and use hidden form fields, and
instead of a link you would have a submit button. Depending
on which way you went would determine how you would read the
information on the online form


message
:I have a link in an email that opens up an online form for
people to
: complete. There is a drop down list on the online form
that people must make
: a selection from. Is there anyway I can have the link in
the email make the
: selection automatically, or somehow prefill a text box. I
am trying to do
: this because of user error and people choosing the wrong
selection.
:
: Any help or suggestions is most appreciated.
:
: Thank you.
: --
: Richard
 
You will need to setup the webpage with form on it to read
the querystring, and insert that into the proper field. This
will vary depending on what technologies are available for
your usage, be it javascript, asp, php, etc



message
: Thank you Mike. I have tried the
www.domain.com?fieldname=value option in an
: email and I can't get it to work. Am I doing something
wrong.
:
: I am using Outlook 2000 and Frontpage 2000.
:
: Thanks again.
: --
: Richard
:
:
: "Mike Mueller" wrote:
:
: > On a straight url, you can 'embed' (for lack of better
term)
: > the form information as a query string (eg
: > www.domain.com?fieldname=value) or if using an html
email
: > you can make a form on that and use hidden form fields,
and
: > instead of a link you would have a submit button.
Depending
: > on which way you went would determine how you would read
the
: > information on the online form
: >
: >
: > message
: >
: > :I have a link in an email that opens up an online form
for
: > people to
: > : complete. There is a drop down list on the online
form
: > that people must make
: > : a selection from. Is there anyway I can have the link
in
: > the email make the
: > : selection automatically, or somehow prefill a text
box. I
: > am trying to do
: > : this because of user error and people choosing the
wrong
: > selection.
: > :
: > : Any help or suggestions is most appreciated.
: > :
: > : Thank you.
: > : --
: > : Richard
: >
: >
: >
 
I will try to add some more info on how to do this in client side
Javascript. See end of post

Mike said:
You will need to setup the webpage with form on it to read
the querystring, and insert that into the proper field. This
will vary depending on what technologies are available for
your usage, be it javascript, asp, php, etc

Test HTML page to call form (You will want to put this in your email as
http://myweb.mydomain.com/test1.html?var=anyvalue )
<html><head></head>
<body>
<a href="test1.html?var=anyvalue">Click me </a>
</body>
</html>

Called HTML
<html>
<head>
<script type="text/javascript">
function qsobj(parm)
{
var qpairs = document.location.search.substring(1).split("&")
var qvbl = qpairs[parm].split("=")
return qvbl[1] ? unescape(qvbl[1].replace(/%20|\ +/g," ")) : null
}
var formvar = qsobj(0)
function getval()
{ document.forms['form1'].elements['no'].value= formvar }
</script>
</head>
<body onload="getval()">
<b>Test form</b>
<form id="form1" action="">
Test field
<input type="text" id="no" value="" size="10" maxlength="10" />
</form>
</body>
</html>

This opens the page with a form with one text field continng the value
"anyvalue".
 
Mike don't you mean something like

(e-mail address removed)?subject=Whatever&body=this is the email body.
 
That's good for sending email with prefilled subject - the OP wishes
to prefill a form field from a link. Mike's solution is correct.
 
Excellent. Thank you all for your help.

I have used Trevor's solution and it works great.
--
Richard


Trevor L. said:
I will try to add some more info on how to do this in client side
Javascript. See end of post

Mike said:
You will need to setup the webpage with form on it to read
the querystring, and insert that into the proper field. This
will vary depending on what technologies are available for
your usage, be it javascript, asp, php, etc

Test HTML page to call form (You will want to put this in your email as
http://myweb.mydomain.com/test1.html?var=anyvalue )
<html><head></head>
<body>
<a href="test1.html?var=anyvalue">Click me </a>
</body>
</html>

Called HTML
<html>
<head>
<script type="text/javascript">
function qsobj(parm)
{
var qpairs = document.location.search.substring(1).split("&")
var qvbl = qpairs[parm].split("=")
return qvbl[1] ? unescape(qvbl[1].replace(/%20|\ +/g," ")) : null
}
var formvar = qsobj(0)
function getval()
{ document.forms['form1'].elements['no'].value= formvar }
</script>
</head>
<body onload="getval()">
<b>Test form</b>
<form id="form1" action="">
Test field
<input type="text" id="no" value="" size="10" maxlength="10" />
</form>
</body>
</html>

This opens the page with a form with one text field continng the value
"anyvalue".
 
Back
Top