How do you force another line in a text box?

R

Richard

When using text boxes. how do you force another line when character spacing
reaches a certain point.
 
R

Ronx

A text box is a single line. Full stop.

A text area will automatically wrap when the user types to the end of the
visible space - this does not, however, add a line feed.
To add a line feed after a preset number of characters, as I said in an
earlier post, you need server side scripting which parses the data, and adds
the line feed at the required intervals. Of course, this is complicated by
needing to account for spaces between words - and avoiding the line feed in
the middle of a word. What you want is a simple text editor - and those
possible, but are NOT easy to construct using web scripting languages
(asp.NET, asp, PHP) on the server, or using Javascript on the client browser
before the form is submitted..

Unless you *really* need a limited line length, the easiest way is to not do
anything for the form data, but deal with how it is rendered in whatever you
use it for.
For a guestbook type application - set the area the data is displayed in to
a limited size.

Perhaps you should explain what you are looking for, and how the results
will be used- an easy solution may be at the end of the processing chain
rather than at the beginning.
--
Ron Symonds
Microsoft MVP (Expression Web)
http://www.rxs-enterprises.org/fp

Reply only to group - emails will be deleted unread.
 

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

Similar Threads

text box layout 4
Wrapping Text in text box 3
How to force Line Spacing? 8
Tab character in a Text Box 1
Text box line spacing 1
Align text in multiple columns 1
Line Spacing 5
How to get Single Line Space 3

Top