7 Replies Latest reply on Jan 13, 2007 3:38 AM by namtax

    cftext area overspill

    namtax
      i am using a cftextarea to input info for biographies on my website....if you look here for example

      http://www.musicexplained.co.uk/index_artist.cfm?id_art=26

      and click on biography, (you will need to login....you can use username blanko, password dranko)

      then add some text on the same sentence, the cftextarea spills over and the scoll bars appear, allowing you to enter as much text as you desire, I would like to control to the amount of words you can enter on each sentence for the text area, much like the inputs used here to post messages.....is it best to use cfinputs in these instances, rather than text areas??cheers

        • 1. Re: cftext area overspill
          c_wigginton Level 1
          You will need to use a Javascript solution (client side)

          http://javascript.internet.com/forms/limit-textarea.html

          You will also need server side validation, such as a cfqueryparam tag and maxlength attribute when you save the data to a database.
          • 2. Re: cftext area overspill
            namtax Level 1
            thanks for the response

            ill give this a go
            • 3. Re: cftext area overspill
              namtax Level 1
              just realised, that isnt 100% what i was looking for, its not the total amount of words I want restricting, its the formattiing....
              So similar to this quick reply field, you cant overspill...you are restriced to a specific
              lenght to enter your words into

              cheers
              • 4. Re: cftext area overspill
                Dan Bracuk Level 5
                quote:

                Originally posted by: namtax
                i am using a cftextarea to input info for biographies on my website....if you look here for example

                then add some text on the same sentence, the cftextarea spills over and the scoll bars appear, allowing you to enter as much text as you desire, I would like to control to the amount of words you can enter on each sentence for the text area, much like the inputs used here to post messages.....is it best to use cfinputs in these instances, rather than text areas??cheers


                I didn't realize there were controls on what was happening on this forum If you think there is, view the source code and see if you can find it.
                • 5. Re: cftext area overspill
                  namtax Level 1
                  oh yeah.......ha ha ha
                  sorry dan, i didnt realise that,
                  ok so what happens when you ovespill in these forums

                  this is just a test, sorry ha ha

                  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                  • 6. Re: cftext area overspill
                    c_wigginton Level 1
                    You can apply a css style to the text area, which will hide the scrollbars.

                    <textarea style="overflow:hidden; width:100px; height:100px"></textarea>

                    In the above example, the textarea would be formatted to fit a 100 x 100 px square. You could still keep on typing after it was filled, but the scrollbar wouldn't show up.
                    • 7. Re: cftext area overspill
                      namtax Level 1
                      oh, its not so much about the scroll bars appearing, i just dont want the content of information inputted by the text areas to spill over a certain area when outputted, i thought the best way to do this was to contain the length of sentences by hard formatting the textarea...