The preferred approach is to do it with JacaScript on the client side 
and also with CF on the Server side.

Client side gives better response (the form is not submitted). 
ServerSide provides a catch-all if the user has JavaScript disabled.

That said, it is also a good idea to include something like the 
following for each field within your SQL insert or Update to avoid 
SQL errors (in case of changes elsewhere in the program)

  INSERT...

  VALUES
  (
    .
    .
    .
   <CFIF Len(Left(Trim(Form.Field), 150))> Left(Trim(Form.Field), 150) 
<CFELSE> NULL </CFIF>.
    .
    .
    .

Dick


At 1:55 PM +1000 7/30/00, AustralianAccommodation.com Pty. Ltd. wrote:
>I am wanting to limit the number of characters being entered into a multi
>lined text area cfform
>
>does cf allow for in the design of the form to limit the input of characters
>to a pre determined number preventing the data input of any further
>characters (keeping in mind this is a multi lined form so the user is able
>to easily read their input)
>
>or does the form need to be submitted by the user and at the time of
>submission cf test to the number of characters prior to updating the
>datafield in the database
>
>or do I have to set the max characters in the memo field of the database to
>the max number of characters accepted and when those characters are exceeded
>the database prevents the update and an appropriate error message is
>displayed
>
>I look forward to your comments / suggestions in this regard and thank you
>in advance
>
>Kind Regards
>
>Claude Raiola (Director)
>AustralianAccommodation.com Pty. Ltd.
>Website: www.AustralianAccommodation.com
>Email: [EMAIL PROTECTED]
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to