PDA

View Full Version : Wrap Text in Mulit Line Form Field


fwr1000
07-17-2006, 02:17 PM
I created a PHP form using the Dreamweaver Club form mail script in DW MX04/Win XP SP2. One of the fields is a multi line text field where the user can enter a resume or type in information. When something is pasted (a resume for example) into the entry area the input wraps and the entry box does not overflow and create a horizontal scroller. However, when something is typed in, the entry information continues in a single line and a horizontal scroller bar appears. Is there some way to limit the width of the entry and do a "carriage return" at the right edge of the entry box? I have tried all of the settings for wrap in the property inspector but none of them accomplish this.

URL http://manisteemedicalcare.com/admincontact.html


TIA

Fred

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Contact the Manistee Medical Care Facility</title>
<meta name="description" content="Contact Page Manistee County Medical Care Facility">
<style type="text/css">
<!--
p {
font-family: "Times New Roman", Times, serif;
font-size: 16px;
font-style: normal;
color: #000099;
font-weight: bold;
margin: 5px;
width: 210px;
text-align: right;
}
h1 {
font-family: "Times New Roman", Times, serif;
font-size: 18px;
font-weight: bold;
color: #000099;
}
h2 {
font-family: "Times New Roman", Times, serif;
font-size: 24px;
color: #000099;
text-align: center;
}
.style1 {color: #000099}
-->
</style>
</head>

<body>


Images/banner/Med_Care_Banner_130.png</p>
<h2>Request for Information Form
</h2>
<h1>Thank you for contacting the Manistee Medical Care Facility. Please complete the form below and then click the SUBMIT button. The information will be sent directly to MCMCF. We will be in touch with you regarding your inquiry.</h1>
<h1>Linda Duchon, Administrator

RN MS LNHA </h1>
<form action="http://www.manisteemedicalcare.com/admincontact.php" method="post" name="admincontact" id="admincontact">
<table width="500" border="0" align="center" cellpadding="5" cellspacing="0" id="admincontact">
<tr>
<td width="200">


<label>First Name</label>
</p></td>
<td width="475"><input name="First Name" type="text" id="First Name"></td>
</tr>
<tr>
<td width="125">


<label>Last Name</label>
</p></td>
<td width="475"><input name="Last Name" type="text" id="Last Name"></td>
</tr>
<tr>
<td width="125">


<label>Street</label>
</p></td>
<td width="475"><input name="Street" type="text" id="Street" size="50"></td>
</tr>
<tr>
<td width="125">


<label>City</label>
</p></td>
<td width="475"><input name="City" type="text" id="City" size="45"></td>
</tr>
<tr>
<td width="125">

State</p></td>
<td width="475"><input name="State" type="text" id="State" size="2"></td>
</tr>
<tr>
<td width="125">


<label>ZIP</label>
</p></td>
<td width="475"><input name="Zip" type="text" id="Zip" size="10"></td>
</tr>
<tr>
<td width="125">


<label>E Mail</label>
</p></td>
<td width="475"><input name="email" type="text" id="email" size="30"></td>
</tr>
<tr>
<td width="125" valign="middle">
<label>



<label>Phone</label>
</label>
</p></td>
<td width="475"><input name="Phone" type="text" id="Phone"></td>
</tr>
<tr>
<td width="125" valign="middle">

Please Contact Me By</p></td>
<td width="475" valign="middle"><select name="select">
<option>(Please Choose)</option>
<option>Phone</option>
<option>E-Mail</option>
<option>US Mail</option>
</select></td>
</tr>
<tr>
<td width="125" valign="top">


<label>Best Time to Contact</label>
</p>


</p></td>
<td width="475" valign="top"><select name="Contact Time" size="1" id="Contact Time">
<option>(Please Choose)</option>
<option>Any</option>
<option>Morning</option>
<option>Afternoon</option>
<option>Evening</option>
</select></td>
</tr>
<tr>
<td width="125"></td>
<td width="475"><h1>Comments, Questions, Concerns, Request Information</h1>
</td>
</tr>
<tr>
<td width="125"></td>
<td width="475"><textarea name="Comments" cols="75" rows="10" wrap="PHYSICAL" id="Comments"></textarea></td>
</tr>
<tr>
<td width="125">

</p></td>
<td width="475" valign="top"><div align="center">
<input type="submit" name="Submit" value="Submit">


<span class="style1">or</span>

Cancel and Return to Home Page (index.html) </div></td>
</tr>
</table>
</form>

</body>
</html>

davidj
07-17-2006, 02:24 PM
the field wraps text as it should

whats the problem?

fwr1000
07-17-2006, 02:38 PM
When I type a string of letters in the "comments/questions" box, the input continues past the right edge of the box. For example, if I just type the letter A continously until I pass the right edge, it will create the bottom scroll bar. Note that I tried this on FireFox 1.5 and IE 6. If I type and then hit return somewhere in the middle of the box, it does wrap. What I would like is the entry data to wrap automatically at the right edge of the input box without having to hit the enter/return key.

Hope this clarifies.

Fred

davidj
07-17-2006, 03:00 PM
I am using IE 6 latest build

your comments box is fine and wraps when text reaches end of field. I have tried keying text and pasting text and both tests wrap as you would expect

I would set the wrap="virtual" then you can see the text wrap within the field. This is not how it would wrap if you were to pull the text from your db though as its just a virtual wrap

fwr1000
07-17-2006, 03:15 PM
Thanks. I think I found what was confusing me. I was just holding down the A key and letting it run to the right edge of the box. Note that the same thing will happen in this box by holding A. If I type a regular sentence it does wrap at the right edge. I've used the A key below to show example. Thanks

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Fred

fwr1000
07-17-2006, 03:16 PM
Opps, guess the example doesn't work/show since the posted reply is wider than this box.

Fred