Results 1 to 3 of 3

Thread: Creating Form Which Would Allow File Attachments

  1. #1
    Join Date
    Aug 2010
    Location
    Jacksonville, FL
    Posts
    85
    Thanks
    31
    Thanked 0 Times in 0 Posts

    Default Creating Form Which Would Allow File Attachments

    I am trying to create a form which would allow file attachments and also respond to the user a recap of their submission. I have an HTML file and an ASP file. When the Submit button is clicked, it returns the response page with the labels but without the information the user entered. I am including the code for these files below:

    HTML FILE:
    [CODE]

    <h3 class="h3no">Website Posting Request Form</h3>
    <div id="webposting">
    <div class="webform5">
    <form method="post" action="web_postinghandler.asp" enctype="multipart/form-data">
    <input type="file" name="attachedfile" maxlength=50 allow="text/*" >

    <label>Contact Name:</label>
    <div class="left"><input type="text" class="blue_form_box" name="Name" maxlength="100" size="50" /> <br /><span class="red">* (Required)</span> </div>
    <p style="clear:both"></p>

    <label>E-Mail Address:</label>
    <div class="left"><input type="text" class="blue_form_box" name="Email" maxlength="100" size="50" /> <br /><span class="red">* (Required)</span><br /></div>
    <p style="clear:both"></p>

    <label>Location/Department:</label>
    <div class="left"><input type="text" class="blue_form_box" name="Location" maxlength="100" size="50" /> <br /><span class="red">* (Required)</span>&nbsp;&nbsp;<br /></div>
    <p style="clear:both"></p>

    <label>Phone:</label>
    <div class="left"><input type="text" class="blue_form_box" name="Phone" maxlength="100" size="50" /> <br><span class="red">* (Required)</span></div>
    <p style="clear:both"></p>

    <label>Title of Program:</label>
    <div class="left"><input type="text" class="blue_form_box" name="Title" maxlength="100" size="50" /> <br /><span class="red">* (Required)</span><br /></div>
    <p style="clear:both"></p>


    <label>Date of Program:</label>
    <div class="left"><input type="text" class="blue_form_box" name="Date" maxlength="100" size="50" /> <br /><span class="red">* (Required)</span><br /></div>
    <p style="clear:both"></p>


    <label>Other Requests:<br> (change or addition to policies, procedures, etc.)</label>
    <div class="left"><textarea class="blue_form_box" name="Changes" rows="5" cols="50"></textarea></div> <p style="clear:both"></p>

    <div align="center">
    <input type="submit" value="Submit" />
    <input type="reset" value="Erase Typing" />
    </div>
    </form>
    </div></div>





    ASP File:
    [CODE]
    <h4 class="h3no">Website Posting Form Has Been Submitted!</h4>
    <h5>Thank you!</h5>
    <hr class="hrno"/>
    <div class="webform5">
    <%
    Dim MsgBody, TargetDept, TargetSubject
    TargetDept = "Technical Support"
    TargetEmail = eckersen@coj.net
    TargetSubject = "Website Posting Form for Program Information"
    MsgBody = "The following information was submitted by " & Request.Form("Name")
    MsgBody = MsgBody & vbCRLF & vbCRLF
    MsgBody = MsgBody & "Title of Program: " & Request.Form("Title") & vbCRLF & vbCRLF
    MsgBody = MsgBody & "Date of Program: " & Request.Form("Date") & vbCRLF
    MsgBody = MsgBody & "Contact Name: " & Request.Form("Name") & vbCRLF & vbCRLF
    MsgBody = MsgBody & "Location/Department: " & Request.Form("Location") & vbCRLF & vbCRLF MsgBody = MsgBody & "Telephone: " & Request.Form("Phone") & vbCRLF & vbCRLF
    MsgBody = MsgBody & "Email Address: " & Request.Form("Email") & vbCRLF & vbCRLF
    %>

    <p><strong>Recap of submission:</strong></p>
    <p><strong>Subject:</strong></p> <% Response.Write(TargetSubject) %> <p><strong>Department:</strong></p> <% Response.Write(TargetDept) %>
    <p><strong>Your Information:</strong></p> <% Response.Write(MsgBody) %>

    <%
    Set objEmail = CreateObject("CDO.Message")
    objEmail.From = website@jpl.coj.net
    objEmail.To = TargetEmail
    objEmail.Subject = TargetSubject
    objEmail.Textbody = MsgBody
    objEmail.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    objEmail.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
    "smtp.coj.net"

    objEmail.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
    objEmail.Configuration.Fields.Update
    objEmail.Send ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

    %>

    <p class="clear_both"></p>
    </div>

    Thank you for any help.

  2. #2
    Join Date
    Mar 2010
    Location
    Florida
    Posts
    512
    Thanks
    9
    Thanked 61 Times in 59 Posts

    Default

    You have a website up and running?

  3. #3
    Join Date
    Aug 2010
    Location
    Jacksonville, FL
    Posts
    85
    Thanks
    31
    Thanked 0 Times in 0 Posts

    Default Form which would allow attachments

    Hi,

    Believe it or not, I handle the Jacksonville Public Library's public website. http://jpl.coj.net

    This is how they save money.....have a Librarian figure out on their own how to program a website so that they can pay nothing! Most of the time, I have no trouble; but when it comes to something like this, it's too complicated for me.

    I'd appreciate any help you can give me. Am I missing some code?
    Thank you so much, Elbee

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •