[Last Call] Learn how to a build a cloud-first strategyRegister Now


Building a simple Questionnaire ?

Posted on 2004-11-09
Medium Priority
Last Modified: 2010-04-07


I'm looking to construct a simple Questionnaire using Dreamweaver.

Can anybody suggest how I do this?  I would like to keep it as simple as possible but would consider using ASP if beneficial?

I am more concerned how to get to the results from the questionnaire to appear in a nicely formatted email?

Question by:andyw27
  • 3
LVL 10

Expert Comment

ID: 12532653
ASP will work quite well if you have CDONTS installed on the server.
PHP is also quite easy.
But this is code for asp:

If Request.ServerVariables("Request_Method") = "POST" then

Dim objMail
Dim strBody

 Set objMail = Server.CreateObject("CDONTS.NewMail")

    objMail.From    = "You***************** "
    objMail.Subject = "Thank You*************** "
    objMail.To      = "you@you.com"

     firstName             = Request.form("fname")
     Lastname             = Request.form("lname")
     emailaddress                      = Request.form("emailaddress")

     HTML = HTML & "<html>"
     HTML = HTML & "<head>"
     HTML = HTML & "</head>"
     HTML = HTML & "<body bgcolor=""FFFFFF""><font size =""2"" face=""Arial"">"
       HTML = HTML & "Thank you" & firstName &" for completing the  Questionnaire.  Your participation in this process is very much appreciated."
       HTML = HTML & "<br>"       
       HTML = HTML & "<hr width=""200"" size=""2"" align=""left"">"
     HTML = HTML & "<p align = ""center"">This email has been auto-generated; Please do not respond.</p>"
       HTML = HTML & "</font></body>"
     HTML = HTML & "</html>"

     objMail.BodyFormat=0 '0= HTML, 1=Text

     objMail.Body = HTML


'You must always do this with CDONTS.
 set objMail = nothing

End If

You should be able to alter this to your needs.
this is the second page of the process. just create a form on the first page and change the form names to sothing more descriptive. then let that form POST to this page.


Author Comment

ID: 12542733

That's great thank you.

One other question how can I get the forms feature to interact with the email.  For example if I had say 4 tick boxes how could I get the label and status of tickbox to show in the email which is returned ?

The same goes for drop down lists ?

LVL 10

Expert Comment

ID: 12543870
same way, just add like this

this first part is the variables
                                  this second part is requesting the info that was put into the form fields

     firstName           = Request.form("fname")
     Lastname           = Request.form("lname")
     emailaddress      = Request.form("emailaddress")

     othercheckbox     =Request.form("nameofthecheckbox")

Hope this helps
LVL 10

Accepted Solution

rockmansattic earned 1000 total points
ID: 12757332
Has you question been answered?
if so, please close this question.  



Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month18 days, 10 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question