[FX.php List] Keeping Carriage Returns in Textarea submissions
Jonathan Schwartz
jschwartz at exit445.com
Thu Aug 9 22:06:07 MDT 2007
Nope. That was the question, all right.
That was easier than I thought. I'd love to have the function.
Thanks
J
At 1:47 PM +1000 8/10/07, Kevin Futter wrote:
>On 10/8/07 1:27 PM, "Jonathan Schwartz" <jschwartz at exit445.com> wrote:
>
>> Hi Folks,
>>
>> I'd like to capture multiple lines of user input in a textarea web
>> form, store the input in FileMaker and re-post the data back on to a
>> web page on demand, maintaining the line breaks. Additionally, I'd
>> like the user to be able to edit the original input and not have to
>> see <break>'s.
>>
>> For reference, I don't want to allow the user to add any text styling
>> or html, so I am not considering a WYSIWYG editor.
>>
>> Any suggestions for how to approach the task?
>>
>> Jonathan
>>
>
>You should be able to do this with out any real effort Jonathan. Simply
>store the text in FileMaker as-is, and then use PHP to parse consecutive
>line feed characters as <p> tags. You can then reparse that data for single
>line feed characters and convert them to <br> elements. I've got a function
>I use to do this if you'd like me to post it. There's no need to store
>anything special in FileMaker, such as HTML or other codes.
>
>Allowing them to edit is simply repopulating a textarea element with the raw
>data from FM - it *should* come across with line breaks intact.
>
>Sorry if I've misunderstood your question!
>
>--
>Kevin Futter
>Webmaster, St. Bernard's College
>http://www.sbc.melb.catholic.edu.au/
>
>
>
>
>#####################################################################################
>This e-mail message has been scanned for Viruses and Content and cleared
>by MailMarshal
>#####################################################################################
>
>This e-mail and any attachments may be confidential. You must not
>disclose or use the information in this e-mail if you are not the
>intended recipient. If you have received this e-mail in error,
>please notify us immediately and delete the e-mail and all copies.
>The College does not guarantee that this e-mail is virus or error
>free. The attached files are provided and may only be used on the
>basis that the user assumes all responsibility for any loss, damage
>or consequence resulting directly or indirectly from the use of the
>attached files, whether caused by the negligence of the sender or
>not. The content and opinions in this e-mail are not necessarily
>those of the College.
>
>_______________________________________________
>FX.php_List mailing list
>FX.php_List at mail.iviking.org
>http://www.iviking.org/mailman/listinfo/fx.php_list
--
Jonathan Schwartz
Exit 445 Group
jonathan at exit445.com
http://www.exit445.com
415-381-1852
More information about the FX.php_List
mailing list