Re:[input] context

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 23955
interpreted = N
texte = >Ken, > >Ok, from reading the docs I though I needed to 'prepare' the text before >it goes into the database.That's true, but all you really need to do to 'prepare' it is to wrap the values in [url] context inside your [append] context ... >Doing a normal html >I haven't created the 'update' pages yet, but have the display pages and >these are not remembering the hard carrige returns.Assuming your display page retrieves data from the about field in the database, the display page should have the [about] tag wrapped in a convertchars context. >this is the entry page: >---------------------- >color=maroon>About the Club > Looks good so far ... >This is the 'preview page' >
face=Helvetica size=2 color=maroon>About the Club
>[input][about][/input] >You can try [convertchars][about][/convertchars] instead of [input][about][/input], but I don't think it will work, at least in terms of displaying the line breaks in the right places, so to properly display them you'll probably have to use another textarea field on this page -- but I don't think you'll need to use [input] here because the about value is coming from the previous page, not from the database. >Then it is saved to the database with: >[append >db=^databases/clubs.db]record_id=[cart]&date_submitted=[date]&date_updated= >[date]&clubname=[clubname]&about=[about]&first_name=[first_name]&last_name= >[last_name]&addr1=[addr1]&addr2=[addr2]&city=[city]&state=[state]&postal_co >de=[postal_code]&country=[country]&telephone=[phone]&phone_ext=[phone_ext]& >fax_number=[fax]&email=[email]&homepage=http://[homepage]&password=[passwor >d]&page_counter=1[/APPEND] >Saving fields to the database is best performed with each field wrapped in a [url] context, to make sure there's no blank spaces or other illegal url characters inside the interpreted values to mess things up.There's no *obvious* space in addr1=[addr1] for example, but when webcat interprets the [addr1] tag and replaces it with 123 Anywhere Place for example, the append will get messed up because there are spaces in 123 Anywhere Place -- and you cannot have any spaces in the string of names and values in your list of parameters.The only fields you don't have to wrap in url contexts are the ones that cannot possibly have any spaces or other illegal url characters in them, such as page_counter=1 for example, because it's clearly impossible for that value to have a space or some other illegal url character in it, since it's a hard-coded value instead of an interpreted value ...>The display page (non-editable) is: >

[input][about][/input]Try using [convertchars][about][/convertchars] here ... >Is there something I am missing? Can I look for something in the actual >database to see if the hard carrige returns are actually being saved?Hard returns are replaced with vertical tab characters, so you can look for vertical tabs in the db file -- but since they are invisible you'll have to use something like BBEdit and select Show Invisibles in order to see them ... :)Sincerely, Kenneth Grome WebDNA Consultant Associated Messages, from the most recent to the oldest:

    
  1. Re:[input] context - solved - Thanks! (webcat 1999)
  2. Re:[input] context (Kenneth Grome 1999)
  3. Re:[input] context (webcat 1999)
  4. Re:[input] context (Kenneth Grome 1999)
  5. Re:[input] context (webcat 1999)
  6. Re:[input] context (Jay Van Vark 1999)
>Ken, > >Ok, from reading the docs I though I needed to 'prepare' the text before >it goes into the database.That's true, but all you really need to do to 'prepare' it is to wrap the values in [url] context inside your [append] context ... >Doing a normal html >I haven't created the 'update' pages yet, but have the display pages and >these are not remembering the hard carrige returns.Assuming your display page retrieves data from the about field in the database, the display page should have the [about] tag wrapped in a convertchars context. >this is the entry page: >---------------------- >color=maroon>About the Club > Looks good so far ... >This is the 'preview page' >
face=Helvetica size=2 color=maroon>About the Club
>[input][about][/input] >You can try [convertchars][about][/convertchars] instead of [input][about][/input], but I don't think it will work, at least in terms of displaying the line breaks in the right places, so to properly display them you'll probably have to use another textarea field on this page -- but I don't think you'll need to use [input] here because the about value is coming from the previous page, not from the database. >Then it is saved to the database with: >[append >db=^databases/clubs.db]record_id=[cart]&date_submitted=[date]&date_updated= >[date]&clubname=[clubname]&about=[about]&first_name=[first_name]&last_name= >[last_name]&addr1=[addr1]&addr2=[addr2]&city=[city]&state=[state]&postal_co >de=[postal_code]&country=[country]&telephone=[phone]&phone_ext=[phone_ext]& >fax_number=[fax]&email=[email]&homepage=http://[homepage]&password=[passwor >d]&page_counter=1[/APPEND] >Saving fields to the database is best performed with each field wrapped in a [url] context, to make sure there's no blank spaces or other illegal url characters inside the interpreted values to mess things up.There's no *obvious* space in addr1=[addr1] for example, but when webcat interprets the [addr1] tag and replaces it with 123 Anywhere Place for example, the append will get messed up because there are spaces in 123 Anywhere Place -- and you cannot have any spaces in the string of names and values in your list of parameters.The only fields you don't have to wrap in url contexts are the ones that cannot possibly have any spaces or other illegal url characters in them, such as page_counter=1 for example, because it's clearly impossible for that value to have a space or some other illegal url character in it, since it's a hard-coded value instead of an interpreted value ...>The display page (non-editable) is: >

[input][about][/input]Try using [convertchars][about][/convertchars] here ... >Is there something I am missing? Can I look for something in the actual >database to see if the hard carrige returns are actually being saved?Hard returns are replaced with vertical tab characters, so you can look for vertical tabs in the db file -- but since they are invisible you'll have to use something like BBEdit and select Show Invisibles in order to see them ... :)Sincerely, Kenneth Grome WebDNA Consultant Kenneth Grome

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:

WebDNA 6.0a for Apache 2.2.4 (2007) I'm tired of all this! (2000) First postarg not taking in $Commands (1997) [WebDNA] My failed cPanel and WebDNA experience ... (2016) Showing once on a founditems (1997) WebCat2 several catalogs? (1997) File Upload (1997) Directory Overload (1998) setitems, one more thing (1997) Emailer and encryption (1997) Editing only the price field in the database (1998) HELP!!! (1998) [OT] See Flash? (2003) Re:trouble (1997) Help formatting search results w/ table (1997) Large sites (2003) Range in [showif] (2000) [WebDNA] WebDNA glitch, no response required ... (2009) RE: [WebDNA] IIS7 test site on MS Server 2008 environment (2012) Banners (1997)