View Full Version : How to get a statement to appear in the submitted email of a form.
Elbee
05-19-2015, 01:08 PM
I have a form to be filled out when requesting to exhibit at the library. A statement at the bottom of the submitted email is required in order for the person to later sign agreeing to the terms. How do I get this statement to appear on the submitted email?
I have read and understand the Jacksonville Public Library Exhibit Policy. I agree to comply with
all policy guidelines stated therein. I agree that the City of Jacksonville and the Jacksonville Public Library, and their
respective officers, agents and employees (the "Indemnified Parties") will not be held liable for any loss or damage
to artwork while on exhibit in the library or during set-up, break-down, or while being shipped to or from the library, and
agree to release and hold harmless from any liability the Indemnified Parties for any damages, claims or liability in connection with the exhibit.
I appreciate your help.
Elbee
Beverleyh
05-19-2015, 02:02 PM
If you post a copy of your form processing script, we can advise where to insert the statement.
Elbee
05-19-2015, 07:45 PM
<h1><span>Request to Exhibit </span></h1>
<form name="requestexhibit" method="post" action="../exhibits/request-to-exhibit-formhandler.asp" onsubmit="return infoValidator()">
<p>The Jacksonville Public Library (JPL) is pleased to provide space for exhibits that support its mission <em>to enrich lives, build community, and foster success by bringing people, information, and ideas together</em>. These exhibits may be educational, cultural, civic or artistic in nature. </p>
<p>In accordance with the <a href="http://www.ala.org/advocacy/intfreedom/librarybill" target="_blank">American Library Association's <em>Library Bill of Rights</em></a>, JPL will make exhibit space available on an "equitable basis regardless of the beliefs or affiliations of the individuals or groups requesting their use,” subject to the policies and guidelines provided here.</p>
<div class="webform5">
<span class="specred">* (Required)</span>
<label for="Exhibitor">Exhibitor</label>
<input class="blue_form_box" name="exhibitor" type="text" size="40" maxlength="50" tabindex="1" /><br /><br />
<span class="specred">* (Required)</span>
<label for="Artist">Artist (if other than the exhibitor)</label>
<input class="blue_form_box" name="artist" type="text" size="40" maxlength="50" tabindex="2" /> <br /><br />
<span class="specred"> </span>
<label for="Organization">Organization (if applicable)</label>
<input class="blue_form_box" name="organization" type="text" size="40" maxlength="50" tabindex="3" /><br /><br />
<div class="clear_both"><br /><br /></div>
<div style="border:1px solid #000000; padding:5px">
<span class="specred">* (Required)</span>
<label for="address">Address</label>
<input class="blue_form_box" name="address" type="text" size="40" maxlength="255" tabindex="5" /><br /><br />
<span class="specred">* (Required)</span>
<label for="city">City</label>
<input class="blue_form_box" name="city" type="text" size="40" maxlength="255" tabindex="6" /><br /><br />
<span class="specred">* (Required)</span>
<label for="state">State</label>
<select name="state" size="1" tabindex="7">
<option value="FL">FL</option>
<option value="AL">AL</option>
<option value="AK">AK</option>
<option value="AZ">AZ</option>
<option value="AR">AR</option>
<option value="CA">CA</option>
<option value="CO">CO</option>
<option value="CT">CT</option>
<option value="DC">DC</option>
<option value="DE">DE</option>
<option value="FL">FL</option>
<option value="GA">GA</option>
<option value="HI">HI</option>
<option value="ID">ID</option>
<option value="IL">IL</option>
<option value="IN">IN</option>
<option value="IA">IA</option>
<option value="KS">KS</option>
<option value="KY">KY</option>
<option value="LA">LA</option>
<option value="ME">ME</option>
<option value="MD">MD</option>
<option value="MA">MA</option>
<option value="MI">MI</option>
<option value="MN">MN</option>
<option value="MS">MS</option>
<option value="MO">MO</option>
<option value="MT">MT</option>
<option value="NE">NE</option>
<option value="NV">NV</option>
<option value="NH">NH</option>
<option value="NJ">NJ</option>
<option value="NM">NM</option>
<option value="NY">NY</option>
<option value="NC">NC</option>
<option value="ND">ND</option>
<option value="OH">OH</option>
<option value="OK">OK</option>
<option value="OR">OR</option>
<option value="PA">PA</option>
<option value="RI">RI</option>
<option value="SC">SC</option>
<option value="SD">SD</option>
<option value="TN">TN</option>
<option value="TX">TX</option>
<option value="UT">UT</option>
<option value="VT">VT</option>
<option value="VA">VA</option>
<option value="WA">WA</option>
<option value="WV">WV</option>
<option value="WI">WI</option>
<option value="WY">WY</option>
</select><br /><br />
<span class="specred">* (Required)</span>
<label for="zip">Zip</label>
<input class="blue_form_box" name="zip" type="text" size="10" maxlength="255" tabindex="8" /><br /><br />
<span class="specred">* (Required)</span>
<label for="phone">Phone Number</label>
<input class="blue_form_box" name="phone" type="text" size="40" maxlength="255" tabindex="9" /><br /><br />
<span class="specred"> </span>
<label for="alternate">Alternate Phone Number</label>
<input class="blue_form_box" name="alternate" type="text" size="40" maxlength="255" tabindex="10" /><br /><br />
<span class="specred">* (Required)</span>
<label for="email">Email Address</label>
<input class="blue_form_box" name="email" type="text" size="40" maxlength="255" tabindex="11" /><br /><br />
<span class="specred"> </span>
<label for="email"><em>Re-enter Email Address</em></label>
<input class="blue_form_box" name="verify_email" type="text" size="40" maxlength="255" tabindex="12" onblur="validateEmail(document.JPLcardappform.email_address.value,document.JPLcardappform.verify_email_address.value)" /><br /><br />
<div style="border:1px solid #000000; padding:5px">
<p class="pbno"><strong>For what time period would you like your work exhibited?</strong> (Write "No preference," if applicable.)</p>
<label for="time">Time Period</label>
<input class="blue_form_box" name="time" type="text" size="40" maxlength="50" tabindex="13" /><br /><br />
<p><strong>Please indicate the <a href="/lib/branches/index.html" target="_new">branch</a> you would like the exhibit installed:</strong></p>
<span class="specred">*(Required)</span>
<label for="library">Library Branch</label>
<select name="library" tabindex="14">
<option value="CHOOSE">Choose a location</option>
<option value="MAIN">Main Library</option>
<option value="ARGYLE">Argyle</option>
<option value="BEACHES">Beaches</option>
<option value="NORTHWEST">Bradham*Brooks Branch</option>
<option value="BRENTWOOD">Brentwood</option>
<option value="EASTSIDE">Brown Eastside</option>
<option value="GRAHAM">Dallas Graham</option>
<option value="HIGHLANDS">Highlands</option>
<option value="MANDARIN">Mandarin</option>
<option value="MAXVILLE">Maxville</option>
<option value="MURRAY">Murray Hill</option>
<option value="EAST">Pablo Creek</option>
<option value="REGENCY">Regency Square</option>
<option value="SANMARCO">San Marco</option>
<option value="SOUTH_MAND">South Mandarin</option>
<option value="SOUTHEAST">Southeast</option>
<option value="UNIVERSITY">University Park</option>
<option value="WEBB">Webb Wesconnett</option>
<option value="WEST">West Regional</option>
<option value="WESTBROOK">Westbrook</option>
<option value="WILLOW">Willowbranch</option>
</select>
<div class="clear_both"><br /><br /><br /></div>
Elbee
05-19-2015, 07:46 PM
<div style="border:1px solid #000000; padding:5px">
<span class="specred">* (Required)</span>
<label for="title">Title of exhibit</label>
<input class="blue_form_box" name="title" type="text" size="40" maxlength="50" tabindex="15" /><br /><br />
<span class="specred">* (Required)</span>
<label>Describe the theme</label>
<textarea class="blue_form_box" name="theme" rows="5" cols="40" tabindex="16"></textarea> <br /><br />
<span class="specred">* (Required)</span>
<label for="pieces">Number of pieces</label>
<input class="blue_form_box" name="pieces" type="text" size="40" maxlength="50" tabindex="17" /><br /><br />
<span class="specred">* (Required)</span>
<label>Why do you believe that this exhibit would enhance the experience of visitors to the Jacksonville Public Library?</label>
<textarea class="blue_form_box" name="enhance" rows="5" cols="40" tabindex="18"></textarea> <br /><br />
<span class="specred">* (Required)</span>
<label>Have you or (if applicable) the organization you are associated with exhibited at the Jacksonville Public Library before? If so, when and where?</label>
<textarea class="blue_form_box" name="before" rows="5" cols="40" tabindex="19"></textarea> <br /><br />
<span class="specred">* (Required)</span>
<label>Describe the credentials and/or previous relevant accomplishments of the exhibitor and/or artist, including previous public exhibits of work.</label>
<textarea class="blue_form_box" name="credentials" rows="5" cols="40" tabindex="20"></textarea> <br /><br />
<label for="website">Artist Website</label>
<input class="blue_form_box" name="website" type="text" size="40" maxlength="50" tabindex="21" /><br /><br />
</div>
<div class="clear_both"><br /><br /></div>
<input class="left imagepad" type="checkbox" name="understand" tabindex="22" />
<p> I have read and understand the <em>Jacksonville Public Library Exhibit Policy</em>.
I agree to comply with all policy guidelines stated therein.
I agree that the City of Jacksonville and the Jacksonville Public Library, and their respective officers, agents and employees
(the "Indemnified Parties") will not be held liable for any loss or damage to artwork while on exhibit in the library
or during set-up, break-down, or while being shipped to or from the library, and agree to release and hold harmless
from any liability the Indemnified Parties for any damages, claims or liability in connection with the exhibit. </p>
<div class="clear_both"><br /><br /></div>
<label for="signature">Signature:</label>
</div>
<div align="center">
<input type="submit" value="Submit Request" tabindex="23" onclick="return infoValidator()" />
<input type="reset" value="Clear Information" tabindex="24" />
</div>
</div></div>
</form>
Beverleyh
05-19-2015, 08:06 PM
What we need is the processing script - the code from this file here;
<form name="requestexhibit" method="post" action="../exhibits/request-to-exhibit-formhandler.asp" onsubmit="return infoValidator()">
As this is ASP, I'll move it to the ASP forum so somebody with more ASP knowledge can help you, once you've posted the contents of the ASP form handler script.
Elbee
05-20-2015, 11:58 AM
<%
Dim MsgBody, TargetEmail, TargetSubject
MsgBody = "Below is the information supplied for requesting to exhibit." & vbCRLF & vbCRLF
MsgBody = MsgBody & "Exhibitor: " & Request.Form("exhibitor") & vbCRLF
MsgBody = MsgBody & "Artist: " & Request.Form("artist") & vbCRLF
MsgBody = MsgBody & "Organization: " & Request.Form("organization") & vbCRLF
MsgBody = MsgBody & "Contact: " & Request.Form("contact") & vbCRLF
MsgBody = MsgBody & "Address: " & Request.Form("address") & vbCRLF
MsgBody = MsgBody & "City: " & Request.Form("city") & vbCRLF
MsgBody = MsgBody & "State: " & Request.Form("state") & vbCRLF
MsgBody = MsgBody & "ZIP: " & Request.Form("zip") & vbCRLF
MsgBody = MsgBody & "PHONE: " & Request.Form("phone") & vbCRLF
MsgBody = MsgBody & "EMAIL: " & Request.Form("email") & vbCRLF
MsgBody = MsgBody & vbCRLF
MsgBody = MsgBody & "library: " & Request.Form("library") & vbCRLF
MsgBody = MsgBody & vbCRLF
MsgBody = MsgBody & "Period of Time: " & Request.Form("time") & vbCRLF
MsgBody = MsgBody & "Theme: " & Request.Form("theme") & vbCRLF
MsgBody = MsgBody & vbCRLF
MsgBody = MsgBody & "Number of pieces: " & Request.Form("pieces") & vbCRLF
MsgBody = MsgBody & vbCRLF
MsgBody = MsgBody & "How would it enhance visitors' experience: " & Request.Form("enhance") & vbCRLF
MsgBody = MsgBody & vbCRLF
MsgBody = MsgBody & "Exhibited at JPL before?: " & Request.Form("before") & vbCRLF
MsgBody = MsgBody & vbCRLF
MsgBody = MsgBody & "Credentials: " & Request.Form("credentials") & vbCRLF
MsgBody = MsgBody & vbCRLF
MsgBody = MsgBody & "Artist's website: " & Request.Form("website") & vbCRLF & vbCRLF
MsgBody = MsgBody & "Understand policy: " & Request.Form("understand") & vbCRLF & vbCRLF
MsgBody = MsgBody & "Signature: " & Request.Form("signature") & vbCRLF
SELECT CASE Request.Form ("library")
CASE "CHOOSE"
TargetEmail = "MainLibrary@coj.net"
CASE "MAIN"
TargetEmail = "eckersen@coj.net"
CASE "ARGYLE"
TargetEmail = "ArgyleLibrary@coj.net"
CASE "BEACHES"
TargetEmail = "BeachesLibrary@coj.net"
CASE "NORTHWEST"
TargetEmail = "NorthwestLibrary@coj.net"
CASE "BRENTWOOD"
TargetEmail = "BrentwoodLibrary@coj.net"
CASE "EASTSIDE"
TargetEmail = "EastsideLibrary@coj.net"
CASE "GRAHAM"
TargetEmail = "GrahamLibrary@coj.net"
CASE "HIGHLANDS"
TargetEmail = "HighlandsLibrary@coj.net"
CASE "MANDARIN"
TargetEmail = "MandarinLibrary@coj.net"
CASE "MAXVILLE"
TargetEmail = "MaxvilleLibrary@coj.net"
CASE "MURRAY"
TargetEmail = "MurrayHillLibrary@coj.net"
CASE "EAST"
TargetEmail = "PabloCreekLibrary@coj.net"
CASE "REGENCY"
TargetEmail = "RegencySquareLibrary@coj.net"
CASE "SANMARCO"
TargetEmail = "SanMarcoLibrary@coj.net"
CASE "SOUTH_MAND"
TargetEmail = "SouthMandarinLibrary@coj.net"
CASE "SOUTHEAST"
TargetEmail = "SoutheastLibrary@coj.net"
CASE "UNIVERSITY"
TargetEmail = "UniversityParkLibrary@coj.net"
CASE "WEBB"
TargetEmail = "WebbWesconnettLibrary@coj.net"
CASE "WEST"
TargetEmail = "WestRegionalLibrary@coj.net"
CASE "WESTBROOK"
TargetEmail = "WestbrookLibrary@coj.net"
CASE "WILLOW"
TargetEmail = "WillowbranchLibrary@coj.net"
END SELECT
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "website@jpl.coj.net"
objEmail.To = TargetEmail
objEmail.Subject = "Request to Exhibit"
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") = _
"smtpscan.coj.net"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Update
objEmail.Send
%>
<h1><span>Request to Exhibit </span></h1>
<h3>Thank you for your request!</h3>
<div class="webform">
<h3>Request for Exhibit</h3>
<span class="specred"> </span>
<label for="exhibitor">Exhibitor</label>
<% =(Request.Form("exhibitor")) %><br />
<span class="specred"> </span>
<label for="artist">Artist</label>
<% =(Request.Form("artist")) %><br />
<span class="specred"> </span>
<label for="organization">Organization</label>
<% =(Request.Form("organization")) %><br />
<span class="specred"> </span>
<label for="contact">Contact</label>
<% =(Request.Form("contact")) %><br />
<span class="specred"> </span>
<label for="phone">Phone </label>
<% =(Request.Form("phone")) %><br />
<span class="specred"> </span>
<label for="email">Email</label>
<% =(Request.Form("email")) %><br />
<span class="specred"> </span>
<label for="address">Address</label>
<% =(Request.Form("address")) %><br />
<span class="specred"> </span>
<label for="city">City</label>
<% =(Request.Form("city")) %><br />
<span class="specred"> </span>
<label for="state">State</label>
<% =(Request.Form("state")) %><br />
<span class="specred"> </span>
<label for="zip">Zip</label>
<% =(Request.Form("zip")) %><br />
<p><strong>Please indicate the branch where you wish to exhibit:</strong></p>
<span class="specred"> </span>
<label for="library">Library Branch</label>
<% =(Request.Form("library")) %><br />
</div>
Beverleyh
05-21-2015, 07:56 AM
I am not an ASP user, but looking at the patterns in the code you posted, you should try to insert your statement by adding a new line of code where indicated below (in red);
<%
Dim MsgBody, TargetEmail, TargetSubject
MsgBody = "Below is the information supplied for requesting to exhibit." & vbCRLF & vbCRLF
MsgBody = MsgBody & "Exhibitor: " & Request.Form("exhibitor") & vbCRLF
MsgBody = MsgBody & "Artist: " & Request.Form("artist") & vbCRLF
MsgBody = MsgBody & "Organization: " & Request.Form("organization") & vbCRLF
MsgBody = MsgBody & "Contact: " & Request.Form("contact") & vbCRLF
MsgBody = MsgBody & "Address: " & Request.Form("address") & vbCRLF
MsgBody = MsgBody & "City: " & Request.Form("city") & vbCRLF
MsgBody = MsgBody & "State: " & Request.Form("state") & vbCRLF
MsgBody = MsgBody & "ZIP: " & Request.Form("zip") & vbCRLF
MsgBody = MsgBody & "PHONE: " & Request.Form("phone") & vbCRLF
MsgBody = MsgBody & "EMAIL: " & Request.Form("email") & vbCRLF
MsgBody = MsgBody & vbCRLF
MsgBody = MsgBody & "library: " & Request.Form("library") & vbCRLF
MsgBody = MsgBody & vbCRLF
MsgBody = MsgBody & "Period of Time: " & Request.Form("time") & vbCRLF
MsgBody = MsgBody & "Theme: " & Request.Form("theme") & vbCRLF
MsgBody = MsgBody & vbCRLF
MsgBody = MsgBody & "Number of pieces: " & Request.Form("pieces") & vbCRLF
MsgBody = MsgBody & vbCRLF
MsgBody = MsgBody & "How would it enhance visitors' experience: " & Request.Form("enhance") & vbCRLF
MsgBody = MsgBody & vbCRLF
MsgBody = MsgBody & "Exhibited at JPL before?: " & Request.Form("before") & vbCRLF
MsgBody = MsgBody & vbCRLF
MsgBody = MsgBody & "Credentials: " & Request.Form("credentials") & vbCRLF
MsgBody = MsgBody & vbCRLF
MsgBody = MsgBody & "Artist's website: " & Request.Form("website") & vbCRLF & vbCRLF
MsgBody = MsgBody & "Understand policy: " & Request.Form("understand") & vbCRLF & vbCRLF
MsgBody = MsgBody & "Signature: " & Request.Form("signature") & vbCRLF
MsgBody = MsgBody & "STATEMENT TEXT HERE" & vbCRLF
Try inserting your text between the quotation marks - your may need to do it in stages in case you hit any errors (in other words, build up the text gradually).
You will probably hit problems with the quotes around "Indemnified Parties" - they need to be escaped http://www.plus2net.com/asp-tutorial/escape.php
I have no way to test so if the advice in that link doesn't work, you should hit Google for other suggestions. Or, maybe just substitute them for apostrophes? ('Indemnified Parties')
& vbCRLF at the end of each line appears to be a carriage return, so you may want to break up your statement into multiple MsgBody strings to manipulate the format with those.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.