form mail input

B

Bryce

I've got this:

<td>
<input type="text" name="Comments_or_Questions" size="40"
maxlength="200">
</td>


It just shows up as a long line to input text. How can I have it scroll
about 5 horizontal lines rather than just a one line box?
 
J

Jukka K. Korpela

Bryce said:
<td>
<input type="text" name="Comments_or_Questions" size="40"
maxlength="200">
</td>

Why is it in a lonely table cell? If you use a table to structure a form,
you need some more markup. But usually you don't need a table for that.
It just shows up as a long line to input text.

Works as designed.
How can I have it scroll
about 5 horizontal lines rather than just a one line box?

<div><label for="comm">Comments or questions:</label></div>
<div><textarea id="comm" name="Comments_or_Questions"
rows="5" cols="40"></textarea></div>

The answer to the anticipated question "but how do I limit the amount of
data to 200 characters?" is "you don't, you just need to deal with that in
the form handler". More on this:
http://www.cs.tut.fi/~jkorpela/forms/textarea.html
Besides, people who want to send more than 200 characters long questions are
probably people that you should serve especially well, instead of limiting
the amount of data. Of course, some of them might actually be nasty robots
(or people) who send your form handler a gigabyte of junk. So you need
_some_ checking in the form handler, but the limit should be of some other
order of magnitude than 200 characters.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top