Textarea Output from Flash Form

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default 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),"&nbsp;&nbsp; &nbsp;","all")>
    <cfset temp =
    replace(temp,chr(9),"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;","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

  2. Similar Questions and Discussions

    1. 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.
    2. 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.
    3. 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...
    4. 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...
    5. 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...
  3. #2

    Default 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),"&nbsp;&nbsp; &nbsp;","all")>
    > <cfset temp =
    > replace(temp,chr(9),"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;","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

  4. #3

    Default 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

  5. #4

    Default 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

  6. #5

    Default Re: Textarea Output from Flash Form

    This was great help!! Thank You..
    Unregistered Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139