>   Is there a way to have a multi-line textbox recognize carriage
>   returns? I have a couple of sites using a simple form for content
>   updates and I'd love for my clients to be able to just hit "enter"
>   and have a new line start that will be recorded in the database, and
>   then on the final <cfoutput>.
>
>   I've looked a little at the custom tags for WYSIWYG style entry
>   forms, but I don't need anything that complicated or complex.

Jeff,

Multiline textboxes recognize carriage returns just fine... it's just when
you output them to an HTML page that they "disappear", because HTML doesn't
give a hoot about carriage return and line feed characters.

The solution is to convert the CRLF sequences to "<BR>" when you output the
text, like so:

<cfset myHTMLOutput =
       Replace("myText","#CHR(13)##CHR(10)","<BR>","All")>

You can also look at the built-in ParagraphFormat() function in CF, but I
don't like that it uses "<P>" for each CRLF... most people will hit Enter
twice for a new paragraph, and once when ending lines on their multi-line
address or signatures, and the <P> tags put too much space between what
should have been single-spaced lines.

Hope this helps,

Ron Allen Hornbaker
President/CTO
Humankind Systems, Inc.
http://humankindsystems.com
mailto:[EMAIL PROTECTED]




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to