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:
Date problems-more (1997)
Adding Shipping Fields (1999)
WebCat2 - storing unformatted date data? (1997)
WebStar and CopyFile (2000)
Odd error in logs (1998)
Help! WebCat2 bug (1997)
SOLUTION? Me know logical no need (2002)
ShowCart (2001)
OT: auto restart MySQL (2006)
Setting up shop (1997)
Extended [ConvertChars] (1997)
WebCat2b13 Command Reference Doc error (1997)
WC2b15 File Corruption (1997)
WebCat2 beta 11 - new prefs ... (1997)
WC2b15 File Corruption (1997)
Mac Scheduling (1998)
[WebDNA] Live Currency exchanege rates (2008)
[WebDNA] Was: wiki Now: Object-oriented programmng (2009)
How to implement 'email to a friend' feature? (2002)
Adding new customer numbers sequentially (1997)