Re: [input] .... [/input] usage
This WebDNA talk-list message is from 2005
It keeps the original formatting.
numero = 61529
interpreted = N
texte = The following steps/example illustrate how to take a textarea input inwhich the user presses enter(s) to format their entered data themselves,and then append it to a database, and later retrieve it, displaying it onthe screen with the enter(s) that they had put in themselves.1. You need a form with a textarea. When initially coding this form, thereis no need (i'm 99% sure on this) to have the [input] tag, however it doesnot hurt anything one bit, so go ahead and pop it on in there....ex:
In reality, what the input tags do is convert return characters back intothe linefeeds necessary to properly redisplay text into a textarea box.Since you have to text to convert, they make no difference here, but it'sgood to get into the habit of using them.2. Next, you want to append this to a database using the [URL] tag.[append db=mydb.db]RID=1234&ATextArea=[URL][_atextarea][/URL][/append]Why the URL? Special control characters sometimes f*ck up webcat commands. This is bad. Using [URL] fixes that problem. In some cases, a user mayhave entered in the text "Sally & Jessy". This would confuse webcatbecause it then replace the variable in the append like so:[append db=mydb.db]RID=1234&ATextArea=Sally & Jessy]When it reaches that "&", it thinks it's now looking at a new field.URL'izing it prevents this error from happening. This is similar whenyou're comparind strings of text in showifs, and the text happens tocontain other comparison operators....but that is digressing from this lesson.In this case, the [URL] will modify those control characters into somethingthat it can handle easily.3. Displaying.Now comes the easy stuff...[convertchars][lookupdb=mydb.db&value=1234&lookinfield=RID&returnfield=ATextArea¬Found=ERR OR][/convertchars]do a search, a lookup, whatever. The convertchars will by default use thedefaultconversions.db, which by some odd coincidence, has an entry thatconverts %0B (a textarea's line feed, URL'ized) to a
tag. If you'reremoved this entry, put it back, or make a new convertchars db, andreference it with the optional db= tag for convertchars.If you correctly follow these 3 steps, then you'll be able to properlydisplay the text that users typed in, with their provided line feeds. Ifyou ever need to allow them to edit their masterpieces, make sure that whenyou autofill in the
so that they can edit it, that you wrap thetext in an [input] context.On 24/03/2005, at 9:56 AM, Lester wrote:> I know this is pretty basic but all> of a sudden I'm slightly confused with> [input][/input] and need some clarification.>> "textarea" and "text" form fields>>> This is what I've always done.....>> In a form for initial data entry I do this:> wrap=virtual> >> It gets written into the db like this:> &BlogText=[url][BlogText][/url]>> Data gets placed back into a form> from the db for editing like this:> name="BlogText">[input][BlogText][/input] >>>> In a text field I do this:> >> It gets written into the db like this:> &BlogTitle=[url][BlogTitle][/url]>> Unless I do this in my "edit" form text field after I> snatch data from the db:> value="[input][BlogTitle][/input]" size="50">>> I see nothing in the textfield if the data has a> special character like a quote mark surrounding a word> etc.>> BUT I've never really used [input][/input] with a> simple text field when I've placed data back into a> form for editing.... never ran into any problems> before I guess....>> Today I did LOL>> The docs sorta only say to use the [input][/input]> tags within >>>> Is it normal to use [input][/input]in a form text> fields to show illegal characters??>> [convertchars][/convertchars] didn't seem to work> [url][/url] just mucked up the data in the edit field>>> Like I say, I may just never had a quote mark in a> text field entered before and may have never seen this> happen, so excuse the long post for such a basic> question.>> Thanks>>>>>> > __________________________________> Do you Yahoo!?> Yahoo! Small Business - Try our new resources site!> http://smallbusiness.yahoo.com/resources/>> -------------------------------------------------------------> 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/>>RegardsStuart Tremainidfk web developments114a/40 yeo street neutral bay 2089 australiat +612 9908 2134f +612 9908 4837-------------------------------------------------------------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:
The following steps/example illustrate how to take a textarea input inwhich the user presses enter(s) to format their entered data themselves,and then append it to a database, and later retrieve it, displaying it onthe screen with the enter(s) that they had put in themselves.1. You need a form with a textarea. When initially coding this form, thereis no need (i'm 99% sure on this) to have the [input] tag, however it doesnot hurt anything one bit, so go ahead and pop it on in there....ex:[input] [/input] In reality, what the input tags do is convert return characters back intothe linefeeds necessary to properly redisplay text into a textarea box.Since you have to text to convert, they make no difference here, but it'sgood to get into the habit of using them.2. Next, you want to append this to a database using the [url] tag.[append db=mydb.db]RID=1234&ATextArea=[url] [_atextarea][/URL][/append]Why the URL? Special control characters sometimes f*ck up webcat commands. This is bad. Using [url] fixes that problem. In some cases, a user mayhave entered in the text "Sally & Jessy". This would confuse webcatbecause it then replace the variable in the append like so:[append db=mydb.db]RID=1234&ATextArea=Sally & Jessy]When it reaches that "&", it thinks it's now looking at a new field.URL'izing it prevents this error from happening. This is similar whenyou're comparind strings of text in showifs, and the text happens tocontain other comparison operators....but that is digressing from this lesson.In this case, the [url] will modify those control characters into somethingthat it can handle easily.3. Displaying.Now comes the easy stuff...[convertchars] [lookupdb=mydb.db&value=1234&lookinfield=RID&returnfield=ATextArea¬Found=ERR OR][/convertchars]do a search, a lookup, whatever. The convertchars will by default use thedefaultconversions.db, which by some odd coincidence, has an entry thatconverts %0B (a textarea's line feed, URL'ized) to a tag. If you'reremoved this entry, put it back, or make a new convertchars db, andreference it with the optional db= tag for convertchars.If you correctly follow these 3 steps, then you'll be able to properlydisplay the text that users typed in, with their provided line feeds. Ifyou ever need to allow them to edit their masterpieces, make sure that whenyou autofill in the so that they can edit it, that you wrap thetext in an [input] context.On 24/03/2005, at 9:56 AM, Lester wrote:> I know this is pretty basic but all> of a sudden I'm slightly confused with> [input] [/input] and need some clarification.>> "textarea" and "text" form fields>>> This is what I've always done.....>> In a form for initial data entry I do this:> wrap=virtual> >> It gets written into the db like this:> &BlogText=[url] [BlogText][/url]>> Data gets placed back into a form> from the db for editing like this:> name="BlogText">[input] [BlogText][/input] >>>> In a text field I do this:> >> It gets written into the db like this:> &BlogTitle=[url] [BlogTitle][/url]>> Unless I do this in my "edit" form text field after I> snatch data from the db:> value="[input] [BlogTitle][/input]" size="50">>> I see nothing in the textfield if the data has a> special character like a quote mark surrounding a word> etc.>> BUT I've never really used [input] [/input] with a> simple text field when I've placed data back into a> form for editing.... never ran into any problems> before I guess....>> Today I did LOL>> The docs sorta only say to use the [input] [/input]> tags within >>>> Is it normal to use [input] [/input]in a form text> fields to show illegal characters??>> [convertchars] [/convertchars] didn't seem to work> [url] [/url] just mucked up the data in the edit field>>> Like I say, I may just never had a quote mark in a> text field entered before and may have never seen this> happen, so excuse the long post for such a basic> question.>> Thanks>>>>>> > __________________________________> Do you Yahoo!?> Yahoo! Small Business - Try our new resources site!> http://smallbusiness.yahoo.com/resources/>> -------------------------------------------------------------> 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/>>RegardsStuart Tremainidfk web developments114a/40 yeo street neutral bay 2089 australiat +612 9908 2134f +612 9908 4837-------------------------------------------------------------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/
Stuart Tremain
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:
Using Plug-In while running 1.6.1 (1997)
Running _every_ page through WebCat-error.html (1997)
More DateMath problems (1997)
[WebDNA] HMAC-SHA1 Encryption (2013)
Bug in v5.1? (2003)
[math] with first letter in field? (1997)
Duplicates (1998)
RAM variables (1997)
Where's Cart Created ? (1997)
Interfacing WebMerchant to www.fedex.com (1997)
TCP Connect (1999)
URGENT: WebCatalog Stalls (1998)
OT: Non US IP #'s (2003)
Nav. 4 probs with cart (1997)
Error with [applescript] (1999)
Accentued characters in emails (2000)
send mail problem? (1997)
WebCatalog for Postcards ? (1997)
[WebDNA] shopping sites and the "old commerce tags" (2012)
randomness (1997)