1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Can anyone help how my contact form reads when it comes to email?

Discussion in 'C#' started by Ellablue, Feb 27, 2008.

  1. #1
    Hi again,
    I've just had a problem solved with my email form (THANK YOU FREEBORN JOHN!), and now my contact form IS sending through to my email,however the view is asp, rather then html...in other words it's not spaced like the words I'm writing now, but jumbled together exactly as on the asp form. Here is what it looks like when it comes in:
    ContactName: testgirl
    ContactPhone: 1234567891
    ContactEmail:
    ContactAddress: 12345 test testy drive, testo CA. 92504
    StudentsName: test
    YearofHighSchoolGraduation: 1987
    StudentsSATscores: 1700
    StudentsGPA: 4.0
    PleasetypeallthatapplyIaminterestedinAlltypesoffinancialaidscholarshipsAthleticscholarshipsonlySkilldevelopmentforbaseballonly:
    PleasetypeallthatapplyCollegepreferencesInstateOutofstatePublicPrivate:
    Private
    How can I have the questions come through with proper spacing? These will be forwarded to someone, and I'd like to make it easier for them to read...?
     
    Ellablue, Feb 27, 2008 IP
  2. JohnZing

    JohnZing Peon

    Messages:
    109
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2

    You must change the code of the script (that generates the email text). If you dont have access to the script there is nothing you can do.
     
    JohnZing, Feb 27, 2008 IP
  3. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #3
    At the moment it is simply giving the ID of the input and then its associated value.

    Depending on how your script is working will dictate how to fix it.....

    If it looks at each input individually/ by name then just type what you want it to say rather than the input's ID

    If it takes a collection of all returned inputs and cycles through them then the easiest way to deal with it is to change the names of the inputs replacing spaces with _ and then in your script that retrieves the ID of the input have it replace the _ back with spaces
     
    AstarothSolutions, Feb 27, 2008 IP
  4. Ellablue

    Ellablue Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    errr...I have absolutely no idea what you've just said, but it sounds like you know exactly what the issue is...Is the script the contact.asp that's uploaded to my site files along with the contact.html? Should I post it here?
     
    Ellablue, Feb 28, 2008 IP
  5. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #5
    If you post the ASP file's content.... there are two ways of doing this, explicitly calling each textbox etc or find them all as a collection and then cycle through them. Depending on which one its using will dictate how to fix the problem
     
    AstarothSolutions, Feb 29, 2008 IP
  6. Ellablue

    Ellablue Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    OK, I still barely understand what you're saying, but here is the asp code, I hope:) It's a few days old, before I added a valid contactfrom email, but everything else is the same. I hope this is what I need to post, if not I'm sorry.
    <title>contact.asp</title><%
    ' declare variables
    Dim ContactName
    Dim ContactPhone
    Dim ContactEmail
    Dim ContactAddress
    Dim StudentsName
    Dim YearofHighSchoolGraduation
    Dim StudentsSATscores
    Dim StudentsGPA
    Dim PleasetypeallthatapplyIaminterestedinAlltypesoffinancialaidscholarshipsAthleticscholarshipsonlySkilldevelopmentforbaseballonly
    Dim PleasetypeallthatapplyCollegepreferencesInstateOutofstatePublicPrivate

    ' get posted data into variables
    EmailTo = "k.anderson.design@gmail.com"
    ContactName = Trim(Request.Form("ContactName"))
    ContactPhone = Trim(Request.Form("ContactPhone"))
    ContactEmail = Trim(Request.Form("ContactEmail"))
    ContactAddress = Trim(Request.Form("ContactAddress"))
    StudentsName = Trim(Request.Form("StudentsName"))
    YearofHighSchoolGraduation = Trim(Request.Form("YearofHighSchoolGraduation"))
    StudentsSATscores = Trim(Request.Form("StudentsSATscores"))
    StudentsGPA = Trim(Request.Form("StudentsGPA"))
    PleasetypeallthatapplyIaminterestedinAlltypesoffinancialaidscholarshipsAthleticscholarshipsonlySkilldevelopmentforbaseballonly = Trim(Request.Form("PleasetypeallthatapplyAlltypesoffinancialaidscholarshipsAthleticscholarshipsonlySkilldevelopmentforbaseballonly"))
    PleasetypeallthatapplyCollegepreferencesInstateOutofstatePublicPrivate = Trim(Request.Form("PleasetypeallthatapplyCollegepreferencesInstateOutofstatePublicPrivate"))

    ' validation
    Dim validationOK
    validationOK=true
    If (Trim(EmailTo)="") Then validationOK=false
    If (validationOK=false) Then Response.Redirect("error.htm?" & EmailFrom)

    ' prepare email body text
    Dim Body
    Body = Body & "ContactName: " & ContactName & VbCrLf
    Body = Body & "ContactPhone: " & ContactPhone & VbCrLf
    Body = Body & "ContactEmail: " & ContactEmail & VbCrLf
    Body = Body & "ContactAddress: " & ContactAddress & VbCrLf
    Body = Body & "StudentsName: " & StudentsName & VbCrLf
    Body = Body & "YearofHighSchoolGraduation: " & YearofHighSchoolGraduation & VbCrLf
    Body = Body & "StudentsSATscores: " & StudentsSATscores & VbCrLf
    Body = Body & "StudentsGPA: " & StudentsGPA & VbCrLf
    Body = Body & "PleasetypeallthatapplyIaminterestedinAlltypesoffinancialaidscholarshipsAthleticscholarshipsonlySkilldevelopmentforbaseballonly: " & PleasetypeallthatapplyIaminterestedinAlltypesoffinancialaidscholarshipsAthleticscholarshipsonlySkilldevelopmentforbaseballonly & VbCrLf
    Body = Body & "PleasetypeallthatapplyCollegepreferencesInstateOutofstatePublicPrivate: " & PleasetypeallthatapplyCollegepreferencesInstateOutofstatePublicPrivate & VbCrLf

    ' send email
    Dim mail
    Set mail = Server.CreateObject("CDONTS.NewMail")
    mail.To = EmailTo
    mail.From = EmailFrom
    mail.Subject = Subject
    mail.Body = Body
    mail.Send

    ' redirect to success page
    Response.Redirect("thank you.html?" & EmailFrom)
    %>
     
    Ellablue, Feb 29, 2008 IP
  7. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #7
    In the section:
    Dim Body
    Body = Body & "ContactName: " & ContactName & VbCrLf
    Body = Body & "ContactPhone: " & ContactPhone & VbCrLf
    Body = Body & "ContactEmail: " & ContactEmail & VbCrLf
    Body = Body & "ContactAddress: " & ContactAddress & VbCrLf
    Body = Body & "StudentsName: " & StudentsName & VbCrLf
    Body = Body & "YearofHighSchoolGraduation: " & YearofHighSchoolGraduation & VbCrLf
    Body = Body & "StudentsSATscores: " & StudentsSATscores & VbCrLf
    Body = Body & "StudentsGPA: " & StudentsGPA & VbCrLf
    Body = Body & "PleasetypeallthatapplyIaminterestedinAlltypesoffinancialaidscholarshipsAthleticscholarshipsonlySkilldevelopmentforbaseballonly: " & PleasetypeallthatapplyIaminterestedinAlltypesoffinancialaidscholarshipsAthleticscholarshipsonlySkilldevelopmentforbaseballonly & VbCrLf
    Body = Body & "PleasetypeallthatapplyCollegepreferencesInstateOutofstatePublicPrivate: " & PleasetypeallthatapplyCollegepreferencesInstateOutofstatePublicPrivate & VbCrLf
    
    Code (ASP):
    Add the spaces to the elements within the ""
     
    AstarothSolutions, Feb 29, 2008 IP
  8. Ellablue

    Ellablue Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    thank you AstorothSolutions~
    It comes through with decent spaces, so that you can tell what it's asking, but now, my text boxes don't show up on those two questions. You can type in answers on the webpage "financial aid" and "College Preferences", but only the question comes through in the email, nothing that you typed in the answer boxes...
    Here's what that part of the code looks like now, please tell me if you need to see another part of the code.
    ' prepare email body text
    Dim Body
    Body = Body & "Contact Name: " & ContactName & VbCrLf
    Body = Body & "Contact Phone: " & ContactPhone & VbCrLf
    Body = Body & "Contact Email: " & ContactEmail & VbCrLf
    Body = Body & "Contact Address: " & ContactAddress & VbCrLf
    Body = Body & "Students Name: " & StudentsName & VbCrLf
    Body = Body & "Year of High School Graduation: " & YearofHighSchoolGraduation & VbCrLf
    Body = Body & "Students SAT scores: " & StudentsSATscores & VbCrLf
    Body = Body & "Students GPA: " & StudentsGPA & VbCrLf
    Body = Body & "Please type all that apply: All types of financial aid scholarships, Athletic scholarships only, Skill development for baseball only" & pleasetypeallthatapplyAlltypesoffinancialaidscholarshipsAthleticscholarshipsonlySkilldevelopmentforbaseballonly & VbCrLf
    Body = Body & "Please type all that apply: College preferences: In state, Out of state, Public, Private: " & PleasetypeallthatapplyCollegepreferencesInstateOutofstatePublicPrivate & VbCrLf
     
    Ellablue, Mar 3, 2008 IP
  9. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #9
    You need to check the ID of the text box on the form itself and make sure it is the same in the script that calls it which is this part:

    
    EmailTo = "k.anderson.design@gmail.com"
    ContactName = Trim(Request.Form("ContactName"))
    ContactPhone = Trim(Request.Form("ContactPhone"))
    ContactEmail = Trim(Request.Form("ContactEmail"))
    ContactAddress = Trim(Request.Form("ContactAddress"))
    StudentsName = Trim(Request.Form("StudentsName"))
    YearofHighSchoolGraduation = Trim(Request.Form("YearofHighSchoolGraduation"))
    StudentsSATscores = Trim(Request.Form("StudentsSATscores"))
    StudentsGPA = Trim(Request.Form("StudentsGPA"))
    PleasetypeallthatapplyIaminterestedinAlltypesoffinancialaidscholarshipsAthleticscholarshipsonlySkilldevelopmentforbaseballonly = Trim(Request.Form("PleasetypeallthatapplyAlltypesoffinancialaidscholarshipsAthleticscholarshipsonlySkilldevelopmentforbaseballonly"))
    PleasetypeallthatapplyCollegepreferencesInstateOutofstatePublicPrivate = Trim(Request.Form("PleasetypeallthatapplyCollegepreferencesInstateOutofstatePublicPrivate")) 
    
    Code (asp):
    If it isnt the same you need to either change the name of the item on the form or change the bit in the "request.form("FormItemsName")"
     
    AstarothSolutions, Mar 6, 2008 IP
  10. Ellablue

    Ellablue Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    I'm sorry, I'm confused...what form, the html? I didn't change anything except the spacing on the asp, so I'm not sure? Also, don't know what an ID is.

     
    Ellablue, Mar 7, 2008 IP
  11. Freelancer4u

    Freelancer4u Banned

    Messages:
    57
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #11
    iF YOU WANT,I CAN HAVE A SUPERB AJAX LOADED CONTACT FORM SCRIPT FOR YOU.. PM ME FOR IT...
     
    Freelancer4u, Mar 7, 2008 IP