Skip to main content
Inspiring
June 16, 2009
Question

50 char limit textarea

  • June 16, 2009
  • 2 replies
  • 1001 views

Here's my code:

<textarea rows="3" name="unavailability" cols="63" wrap="virtual" ></textarea>Comments

This field is being cut off at 50 chars in my SQL server from a cold fusion page. What can I do to allow more than 50 chars (or even unlimited) to be accepted?

Thanks,

Phil

    This topic has been closed for replies.

    2 replies

    Inspiring
    June 16, 2009

    Step 1 - cfdump your form scope.  See if the truncation has already occurred.

    ilssac
    Inspiring
    June 16, 2009

    After that, if the form data is correct.

    Look at the stored procedure you are calling.  Are the in parameters limited in length?

    Inspiring
    June 17, 2009

    Ian,

    You hit the nail. I had varchar(50) in the paramater section for the SP.

    Thanks,

    Phil

    Inspiring
    June 16, 2009

    btw, my SQL server column is varchar(max), so it's not cutting off there.

    ilssac
    Inspiring
    June 16, 2009

    Where is your code that does something with the form data when it is submitted ultimately being used in some type of SQL or Stored Procedure to get inserted into the database.

    Inspiring
    June 16, 2009

    It's in a seperate page. Page one (with the textarea) posts to this page which does a Stored procedure call:

    <cfstoredproc procedure="blah" datasource="blah_blah">  
      <cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbvarname="@netid" value="#Session.netid#">
      <cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbvarname="@first_name" value="#Form.first_name#">
      <cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbvarname="@last_name" value="#Form.last_name#">   
      <cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbvarname="@department" value="#Form.department#">
      <cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbvarname="@areas_of_research" value="#areas_of_research#">
      <cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbvarname="@student_capacity" value="#Form.student_capacity#">
      <cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbvarname="@unavailability" value="#Form.unavailability#">           
      <cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbvarname="@vita_URL" value="#Form.vita_URL#">
    </cfstoredproc>