Text Block - limit data entered, how?

Author Message

Tian DK

Friday 19 August 2005 2:34:41 am

Hi!

I need to allow users to create a new class, and one of the datatypes will be a text block.

<b>My requirements for the text block is as follows:</b>
<b>1</b> - I need to limit the number of charatcers entered into the text block(for example 250 characters). <i>I know this can be done with text line, but the look of the text line is not very convenient for entering for example a short paragraph of text.</i> Is this possible? Maybe the text line can be changed so it looks like a text block?
<b>2</b> - I need to be able to display a count of how many characters have been typed into the text block(while user is typing). Anybody knows if this is possible? Maybe I will have to use Javascript?

Thanks in advance for any help!

Arran Price

Sunday 21 August 2005 6:46:51 pm

Hi Tian,
If you create a custom template and override the edit for the new class you should be able to control everything.
This would allow you to change the look of the entry fields etc (ie not using the default edit ones).
If you fix the field size to 250 do you still need the count? (I think javascript is likely to be your friend on that one).

Hope thats of some help.

Arran

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.