Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
boopower #1
Textarea Output from Flash Form
In a non-Flash form, I use a textarea field to allow customers to input
multiple lines of product numbers:
For example:
101505
101565
88754
When i process the form, I run the following code to preserve the line breaks:
<cfparam name="attributes.input" default="">
<cfparam name="attributes.output" default="htmlformatted_string">
<cfset temp = attributes.input>
<cfset temp = replace(temp,chr(13)&chr(10)&chr(13)&chr(10),"~"," all")>
<cfset temp = replace(temp,chr(13)&chr(10),"~","all")>
<cfset temp = replace(temp,chr(32)&chr(32)&chr(32)," ","all")>
<cfset temp =
replace(temp,chr(9),"   ; ","all")>
<cfset x = setvariable("caller."&attributes.output,temp)>
Then I loop through the results using a '~' as a delimiter which I set above:
<CFLOOP LIST="#partrow#" INDEX="thisnum" delimiters="~">
I perform database oerations here with #thisnum# as the item number
</CFLOOP>
HOWEVER, when I switch to using cftextarea in a FLASH FORM, I do not get the
same results, and the resulting test appears as follows:
101505 101565 88754
AND I cannot use a space as a delimiter, because the HTML shows the item as:
101505
101565
88754
with not spaces in the "view source" results...
Has anyone seen this yet and found a workaround? What I need is to find out
how I can process the results of a cftextarea in FLASH CFFORM are parse out the
line breaks into a workable delimiter?
ANY HELP WOULD BE MOST APPRECIATED!
I really need this to work from a Flash Cfform!!!
boopower Guest
-
Flash Textarea Scrollbar Color Change
Is it possible to change the color of the scrollbar of the textarea component using flash professional 8.0. Thank you. -
Flash Textarea Background Image
Is it possible to link a background image to a textarea component using flash professional 8.0? Your help would be greatly appreciated. -
Textarea problem in form: values not recognised
In a php form that should be send by email, I have been puzzling the whole night long about the fact that the content of a textarea was not passed... -
Removing carriage returns from <textarea></textarea> input
Hiya, I have a form with a <textarea></textarea> to receive user input. This input is then stored in a database and sent by fax... I need to... -
textarea box in form, but displays as line in echo
I have a form that has a text box, i.e. text area that takes 200 characters max. When I use my update script and it brings up the information in the... -
Mike Nimer #2
Re: Textarea Output from Flash Form
Flash will submit the line breaks in the textarea as chr(13), so this should
work for you.
----------------------------------------
<cfdump var="#form#">
<cfparam name="form.foo" default="">
<cfscript>
form.foo = replace(form.foo, chr(13), "~", "all");
</cfscript>
<cfdump var="#form#">
<cfform format="Flash">
<cftextarea name="foo" width="300" height="200"></cftextarea>
<cfinput type="Submit" name="btn" value="Change">
</cfform>
-------------------------------
hth,
---nimer
"boopower" <webforumsuser@macromedia.com> wrote in message
news:d0aaio$oo3$1@forums.macromedia.com...> In a non-Flash form, I use a textarea field to allow customers to input
> multiple lines of product numbers:
>
> For example:
> 101505
> 101565
> 88754
>
> When i process the form, I run the following code to preserve the line
> breaks:
>
> <cfparam name="attributes.input" default="">
> <cfparam name="attributes.output" default="htmlformatted_string">
> <cfset temp = attributes.input>
> <cfset temp = replace(temp,chr(13)&chr(10)&chr(13)&chr(10),"~"," all")>
> <cfset temp = replace(temp,chr(13)&chr(10),"~","all")>
> <cfset temp =
> replace(temp,chr(32)&chr(32)&chr(32)," ","all")>
> <cfset temp =
> replace(temp,chr(9),"   ; ","all")>
> <cfset x = setvariable("caller."&attributes.output,temp)>
>
> Then I loop through the results using a '~' as a delimiter which I set
> above:
>
> <CFLOOP LIST="#partrow#" INDEX="thisnum" delimiters="~">
> I perform database oerations here with #thisnum# as the item number
> </CFLOOP>
>
> HOWEVER, when I switch to using cftextarea in a FLASH FORM, I do not get
> the
> same results, and the resulting test appears as follows:
>
> 101505 101565 88754
>
> AND I cannot use a space as a delimiter, because the HTML shows the item
> as:
> 101505
> 101565
> 88754
>
> with not spaces in the "view source" results...
>
> Has anyone seen this yet and found a workaround? What I need is to find
> out
> how I can process the results of a cftextarea in FLASH CFFORM are parse
> out the
> line breaks into a workable delimiter?
>
> ANY HELP WOULD BE MOST APPRECIATED!
>
> I really need this to work from a Flash Cfform!!!
>
Mike Nimer Guest
-
boopower #3
Re: Textarea Output from Flash Form
YOU ROCK!
That is perfect!
I sure hope this helps others who are trying to do the same thing...
boopower Guest
-
Velaria #4
Re: Textarea Output from Flash Form
/cheer YAY!! I was facing this same problem while converting many of my forms to the flash based forms in CFMX7. This was a HUGE help!!!
Many thanks!
Velaria Guest
-
Unregistered #5
Re: Textarea Output from Flash Form
This was great help!! Thank You..
Unregistered Guest



Reply With Quote

