Re: Displaying text and populating form fields (again)

This WebDNA talk-list message is from

2005


It keeps the original formatting.
numero = 61264
interpreted = N
texte = On Fri, 25 Feb 2005 10:21:07 -0600 "eLists" wrote: > Hello, > > I have a form where user fill out a text area, then when they post > the page, the resulting page sends an email with the content of > their message. I also display their message on the webpage. The data > is never stored in a database. > When I display the data on the results page, all line breaks are > lost . What should I be doing to this data so that the line breaks > are preserved on this results page? > > on the message page, the textarea is: > > > > On the results page, to display their message from the textarea on > the preceeding page: > > [unurl][message][/unurl] > > > > Over time I have tried many things, but the above has been the best > so far. I would really like to be able to display the line breaks in > their message without having to store it in a database. > > Thanks > > > On Thu, 24 Feb 2005 13:30:15 +0800 > Kenneth Grome wrote: > > >on 2/23/2005 1:30 pm, Donovan Brooke at dbrooke@euca.us so > >noted... > > > > > >> as well as it doesn't protect against when someone goes to edit > > >>formerlly > > >> textarea input (input with carraige returns) in a hidden form > > >>field. > > > > > >As an aside, I've a CMS that's been used for the last five years > > >with a > > >variety of Mac and PC users on various browsers. It passes > > >textarea-entered > > >data with plain, unescaped, drop-to-the-next-line line breaks > >using > > >hidden > > >form fields across multiple pages without any problems. > > > > > > That's because the data is initially entered by the visitor into a > > textarea field which can pass line break characters, and you're > > continuing to pass the data via hidden form fields which can *also* > > pass line break characters. > > > > If you switched from hidden fields to text fields when passing your > > data you would immediately learn that everything after the first > > line break character will be lost, because text fields cannot pass > > line break characters or anything that follows a line break > > character. Of course you're not going to do this, I'm only saying > > this to illustrate a point, and my point is this: > > > > Hidden fields and textarea fields work exactly the same, except > >that > > one is editable by the visitor and one is not. It's the text > >fields > > that cannot pass line break characters, and this is what creates > >the > > problem ... > > > > -- > > > > Sincerely, > > Kenneth Grome > > www.kengrome.com > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Displaying text and populating form fields (again) ( Kenneth Grome 2005)
  2. Re: Displaying text and populating form fields (again) ( Donovan Brooke 2005)
  3. Re: Displaying text and populating form fields (again) ( Stuart Tremain 2005)
  4. Re: Displaying text and populating form fields (again) ( Stuart Tremain 2005)
  5. Re: Displaying text and populating form fields (again) ( Donovan Brooke 2005)
  6. Re: Displaying text and populating form fields (again) ( Stuart Tremain 2005)
  7. Re: Displaying text and populating form fields (again) ( Donovan Brooke 2005)
  8. Re: Displaying text and populating form fields (again) ( Stuart Tremain 2005)
  9. Displaying text and populating form fields (again) ( eLists 2005)
  10. Re: Displaying text and populating form fields (again) ( "eLists" 2005)
On Fri, 25 Feb 2005 10:21:07 -0600 "eLists" wrote: > Hello, > > I have a form where user fill out a text area, then when they post > the page, the resulting page sends an email with the content of > their message. I also display their message on the webpage. The data > is never stored in a database. > When I display the data on the results page, all line breaks are > lost . What should I be doing to this data so that the line breaks > are preserved on this results page? > > on the message page, the textarea is: > > > > On the results page, to display their message from the textarea on > the preceeding page: > > [unurl][message][/unurl] > > > > Over time I have tried many things, but the above has been the best > so far. I would really like to be able to display the line breaks in > their message without having to store it in a database. > > Thanks > > > On Thu, 24 Feb 2005 13:30:15 +0800 > Kenneth Grome wrote: > > >on 2/23/2005 1:30 pm, Donovan Brooke at dbrooke@euca.us so > >noted... > > > > > >> as well as it doesn't protect against when someone goes to edit > > >>formerlly > > >> textarea input (input with carraige returns) in a hidden form > > >>field. > > > > > >As an aside, I've a CMS that's been used for the last five years > > >with a > > >variety of Mac and PC users on various browsers. It passes > > >textarea-entered > > >data with plain, unescaped, drop-to-the-next-line line breaks > >using > > >hidden > > >form fields across multiple pages without any problems. > > > > > > That's because the data is initially entered by the visitor into a > > textarea field which can pass line break characters, and you're > > continuing to pass the data via hidden form fields which can *also* > > pass line break characters. > > > > If you switched from hidden fields to text fields when passing your > > data you would immediately learn that everything after the first > > line break character will be lost, because text fields cannot pass > > line break characters or anything that follows a line break > > character. Of course you're not going to do this, I'm only saying > > this to illustrate a point, and my point is this: > > > > Hidden fields and textarea fields work exactly the same, except > >that > > one is editable by the visitor and one is not. It's the text > >fields > > that cannot pass line break characters, and this is what creates > >the > > problem ... > > > > -- > > > > Sincerely, > > Kenneth Grome > > www.kengrome.com > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ "eLists"

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

NT Manual (1997) HTML editing and webcatalog (2000) Friday night shopping site joke (1997) No luck with taxes (1997) WebCatalog 3 for Macintosh (1998) Running 2 two WebCatalog.acgi's (1996) Problems with [Applescript] (1997) Search returns all, not 20 (1997) Norton Internet Security filtering out WebDNA processsed (2004) New NT betas available (1997) Generating unique SKU from [cart] - Still Stumped... (1997) Non Standard Product Display Layout (2000) can anyone confirm this behavior? (2003) Performance Issue (2000) emailer w/F2 (1997) Announcement-WebCatalog 2.0 Released (1997) Server Load (2000) [closeDataBase myDataBase.db] not working? (1997) WebCat2b12--[searchstring] bug (1997) returning the missing value (1997)