37 users online (1 members and 36 guests)  


  Results 1 to 4 of 4

Related

  1. required fields in a form    Forum: HTML Forum
    Replies: 17
  2. HTML Form with required fields    Forum: HTML Forum
    Replies: 10
  3. Required Form Fields    Forum: Javascript Forum
    Replies: 1
  4. Replies: 1
  1. #1
    yeboyebo's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2007
    Location
    Sweden
    Posts
    3

    Post How do I set up required fields in JMail form?

    I use this simple code embedded in a thankyou-page being called from a form:

    Code:
    <%
    
    SET JMail = Server.CreateObject("JMail.SMTPMail")
    JMail.ServerAddress = "xxx.xxx.xxx.xxx"
    
    JMail.Sender = "xxx@xxx.xxx"
    
    JMail.Subject = "Subject of message"
    
    JMail.AddRecipient "yyy@yyy.com"
    
    JMail.Body = " " & vbCrLf &_
     " Name: " & Request("name") & vbCrLf &_
     " Address: " & Request("address") & vbCrLf &_
     " Email: " & Request("email") & vbCrLf &_
     " Phone: " & Request("phone")  & vbCrLf &_
     " Message: " & Request("message")  & vbCrLf 
    
    JMail.Priority = 3
    
    JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
    
    JMail.Execute
    
    %>
    Emails go through well, but I would now like to make certain fields in the form required. Would anyone be able to help me with this, perhaps point me in the direction of the code to input above and an error-checking function that needs embedding somewhere?

    Many thanks for any feedback available!
    Last edited by vinyl-junkie; 03-23-2007 at 11:29 AM. Reason: Added code tags

  2. #2
    yeboyebo's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2007
    Location
    Sweden
    Posts
    3

    Re: How do I set up required fields in JMail form?

    Funny, I thought this would be an easy one for someone working more in ASP than me. Turns out it was trickier than I thought... Bummer.

  3. #3
    yeboyebo's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2007
    Location
    Sweden
    Posts
    3

    Re: How do I set up required fields in JMail form?

    Just in case someone else wnats to know the answer, I gave up and did what I should've done from the start, being a noob on asp: I used the software 'Forms To Go' (bebosoft.com/products/formstogo/) instead and everything worked fine. When looking at the code it was pretty good too. So that's my advice to anyone in the same situation.

  4. #4
    vinyl-junkie's Avatar
    Moderator

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    721

    Re: How do I set up required fields in JMail form?

    Sorry you weren't able to get help with JMail, but I'm glad you were able to find a tool that worked for you, and that you shared your findings with us.

    Had I read your message sooner, I would have suggested that you search Google for JMail tutorials. There seem to be quite a few resources. Perhaps one of them would have helped. Often, the documentation that comes with the software will answer any questions you might have. Always be sure to read that first.

    Anyway, this is my 2 cents for the next person who might be searching for the same kind of help.
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more



Tags for this Thread