• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cftext area overspill

New Here ,
Jan 12, 2007 Jan 12, 2007

Copy link to clipboard

Copied

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

TOPICS
Advanced techniques

Views

444

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 12, 2007 Jan 12, 2007

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 12, 2007 Jan 12, 2007

Copy link to clipboard

Copied

thanks for the response

ill give this a go

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 12, 2007 Jan 12, 2007

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 12, 2007 Jan 12, 2007

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 12, 2007 Jan 12, 2007

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 12, 2007 Jan 12, 2007

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 13, 2007 Jan 13, 2007

Copy link to clipboard

Copied

LATEST
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...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation