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:

Some ThankYou page problems (1997) gateway application timeouts (1998) Re1000002: Setting up shop (1997) Showif ~ Netscape : Showif ~ MSIE (2001) Emailer (1997) off-topic - printinglib 68K (1997) Math with Time (1997) RE: Can a database get stomped by simultaneous access? (1997) [WebDNA] WebDNA & VPS (2009) [WebDNA] ONLY the FIRST continuous run of numeric chars? (2008) Problem upgrading from 3.0.8 to 4.0 on MS Windoze 98 / PWS (2000) Bad Cookie / Internet Option / Internet Explorer (2004) Help! WebCat2 bug (1997) Part Html part WebDNA (1997) [WebDNA] convert time stamp back (2010) Suffix Mapping (1998) 2 easy questions re: [showif] and [sendmail] (1997) Nt's Latest? (1997) NT IIS number of files limit (2003) [WebDNA] Hosting for a customer of mine (2012)