Automatic Subscription Submission On Survey Results Page
Now you can collect email address (and other information)
in conjunction with a survey and automatically subscribe
the email address to your ezine or autoresponder.
Master Survey from /master/survey/ has
always been able to process additional information form
fields name and email address, for examples. These could
then be sent to the site owner in an email.
The latest version, 2.8, now has the ability to print any
of that information on the survey results/"thank you" page.
And this opens an exciting opportunity to automatically
submit the information to other software on the Internet.
The ezine/autoresponder subscription form would be
automatically submitted with JavaScript.
Overview
Insert form fields on the survey page to be filled in when
the survey is taken. For purposes of this article, there
would be an email address field and a name field. There may
also be other fields.
The "thank you" web page where the results can be displayed
has an ezine/autoresponder subscription form. This form is
converted to be invisible.
When the survey form is submitted, Master Survey notices the
email address and name that were provided on the survey page.
It inserts that information into the invisible
ezine/autoresponder subscription form.
When the "thank you" web page is displayed in the browser,
the invisible ezine/autoresponder subscription form
automatically submits into a new window. (It opens a new
window so the ezine/autoresponder subscription form handling
software has a place to put its own "thank you" page.)
If the browser is hampered with a popup blocker, the
automatic submission may fail. In that case, the survey
taker must click on a link to effect the subscription.
Details for Implementation
Use the Master Survey control panel to generate the survey
form, as you normally would, and paste it into your web
page. Then add additional form fields to the page for the
information you want to collect.
One of these additional form fields might be for an email
address provided by the survey taker to subscribe to your
ezine/autoresponder. When the survey is submitted, the
results/"thank you" page tries to automatically send
the email address to your subscription software or service.
The form fields you add to the survey page may have any
field name you wish them to have, so long as they begin
with the two characters, "x_". These names are independent
of the form field names your ezine/autoresponder
subscription form uses.
Let's suppose you have two additional fields, one with
name="x_email" and one with name="x_name". To use the
information in your ezine/autoresponder subscription form,
put attributes value="[[x_email]]" and value="[[x_name]]"
in the relevant fields.
An example form is below.
The ezine/autoresponder subscription form needs to be
converted if it is to be invisible and automatically
submitted. Follow these steps to do the conversion:
1. Change all form fields to type="hidden" except the submit
button. Sets with the same form field name, like radio
buttons or checkboxes, need to be changed into one hidden
field per set.
2. Verify all form fields that must contain information have
value attributes. For fields that use information provided
by additional fields submitted with the survey, use the form
field names between double square brackets to represent the
information.
3. Put the submit button between noscript tags. This makes the
submit button show up only when the browser is JavaScript
disabled and can't be submitted automatically.
4. To make the form open a new window when it is submitted,
also put this attribute into the form tag.
target="_blank"
If the form submission should not open a new window, omit
that target attribute.
5. The form needs a name, which is provided with the name
attribute. The JavaScript uses this name to reference the
form.
Here is a converted form example:
Somewhere below the converted form, put this JavaScript
(changing "MyForm" to your form's name):
Working with Popup Blockers
If the survey taker has popup blockers, the above might
not automatically submit the form. For those cases, you can
include a notation similar to this (again, changing "MyForm"
in the link to your form's name):
The above submits the form with a click on the link. Most
popup blockers will allow new windows whenever the user
requests it by clicking on a link.
Avoiding Popup Blockers
The popup blocker hassle can be avoided by omitting the
target="_blank" attribute from the form tag. In that case,
the survey results/"thank you" page will be replaced with
the content or page the ezine/autoresponder subscription
software provides.
If the immediate display of survey results is not required,
automatic same window submission may be preferred.
Alternative Method to View Survey Results
For providing an independent view of results, Master Survey
will display cumulative survey results when a certain link
is clicked. (The link is provided when the survey form is
generated in the control panel.)
This link can be published on other web pages. If you have
design control of it, the link can be published on the
ezine/autoresponder subscription software's confirmation
page.
Question:
Did you find this article interesting and understandable? How can it be improved?
Your response is anonymous.
When done typing, click anywhere outside the box. [more info]
Will Bontrager
©2006 Bontrager Connection, LLC
Please note:
Articles on this website are presented "as is". However -
If you have a question about a CGI script, HTML, CSS, PHP, or JavaScript
Ask one of our Experts and you'll have your answer!
Click here for details.