Share via


We would like to set a character limit of 20 on a Text field in a SharePoint form.

Question

Thursday, September 10, 2015 5:12 PM

We would like to set a character limit of 20 on a Text field in a SharePoint form. Is this possible?

Ron Johnson Systems Administrator Michigan State University Federal Credit Union Office – (517) 333-2391 [email protected] WWW.MSUFCU.ORG

All replies (13)

Thursday, September 10, 2015 5:25 PM ✅Answered

Go to the List Settings, find the particular Field you want to limit, then change the "Maximum number of characters" from 255 to 20.

Trevor Seward

        

This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.


Thursday, September 10, 2015 5:58 PM ✅Answered

All it shows is the following items

Name and Type

Type a name for this column.
  <label for="idColName">Column name:</label> 
<input class="ms-input" id="idColName" maxlength="255" name="DisplayName" size="30" title="Column name:" type="text" value="Additional Notes" />
  The type of information in this column is:  
<input id="onetidTypeText" name="Type" title="The type of information in this column is: Single line of text" type="radio" value="Text" /> <label for="onetidTypeText">Single line of text </label>
<input id="onetidTypeMultiText" name="Type" title="The type of information in this column is: Multiple lines of text" type="radio" value="Note" /> <label for="onetidTypeMultiText">Multiple lines of text</label>
<input id="onetidTypeChoice" name="Type" title="The type of information in this column is: Choice (menu to choose from)" type="radio" value="Choice" /> <label for="onetidTypeChoice">Choice (menu to choose from)</label>
<input id="onetidTypeNumber" name="Type" title="The type of information in this column is: Number (1, 1.0, 100)" type="radio" value="Number" /> <label for="onetidTypeNumber">Number (1, 1.0, 100)</label>
<input id="onetidTypeCurrency" name="Type" title="The type of information in this column is: Currency ($, ¥, €)" type="radio" value="Currency" /> <label for="onetidTypeCurrency">Currency ($, ¥, €)</label>
<input id="onetidTypeDateTime" name="Type" title="The type of information in this column is: Date and Time" type="radio" value="DateTime" /> <label for="onetidTypeDateTime">Date and Time</label>
   

Additional Column Settings

Specify detailed options for the type of information you selected.
  <label for="idDesc">Description:</label> 
<textarea class="ms-input" cols="40" id="idDesc" name="Description" rows="2" title="Description:"></textarea>
  Require that this column contains information:  
<input id="onetidRequiredTrue" name="Required" title="Require that this column contains information: Yes" type="radio" value="TRUE" /> <label for="onetidRequiredTrue">Yes   </label> <input id="onetidRequiredFalse" name="Required" title="Require that this column contains information: No" type="radio" value="FALSE" /> <label for="onetidRequiredFalse">No</label>
  <label for="idNumLines">Number of lines for editing: </label> 


<input name="NumLines" type="HIDDEN" /><input class="ms-input" id="idNumLines" maxlength="255" name="OWS:NumLines:Local" size="11" title="Number of lines for editing" value="3" />
  <label for="onetidRichText">Specify the type of text to allow:</label> 
<input id="onetidRichTextPlain" name="RichText" title="Plain text" type="radio" value="PLAIN" /> <label for="onetidRichTextPlain">Plain text   </label>
<input id="onetidRichTextCompatible" name="RichText" title="Rich text (Bold, italics, text alignment, hyperlinks)" type="radio" value="COMPATIBLE" /> <label for="onetidRichTextCompatible">Rich text (Bold, italics, text alignment, hyperlinks)</label>
<input id="onetidRichTextFullHtml" name="RichText" title="Enhanced rich text (Rich text with pictures, tables, and hyperlinks)" type="radio" value="FullHtml" /> <label for="onetidRichTextFullHtml">Enhanced rich text (Rich text with pictures, tables, and hyperlinks)</label>
  <label for="onetidAppendOnly">Append Changes to Existing Text</label> 
<input id="onetidAppendOnlyTrue" name="AppendOnly" title="Append Changes: Yes" type="radio" value="TRUE" /> <label for="onetidAppendOnlyTrue">Yes   </label> <input id="onetidAppendOnlyFalse" name="AppendOnly" title="Append Changes: No" type="radio" value="FALSE" /> <label for="onetidAppendOnlyFalse">No</label>

Ron Johnson Systems Administrator Michigan State University Federal Credit Union Office – (517) 333-2391 [email protected] WWW.MSUFCU.ORG


Thursday, September 10, 2015 6:02 PM ✅Answered

Can you post a screenshot of what you're seeing instead? The Single Line of Text field does have this option.

Trevor Seward

        

This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.


Thursday, September 10, 2015 6:05 PM ✅Answered

Ron Johnson Systems Administrator Michigan State University Federal Credit Union Office – (517) 333-2391 [email protected] WWW.MSUFCU.ORG


Thursday, September 10, 2015 6:13 PM ✅Answered

Upload it to http://imgur.com or OneDrive and share it out.

Trevor Seward

        

This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.


Thursday, September 10, 2015 6:14 PM ✅Answered

Name and Type

Type a name for this column.

 

 

  Column name:

 

 

 

  The type of information in this column is: 

 

  Single line of text 

  Multiple lines of text

  Choice (menu to choose from)

  Number (1, 1.0, 100)

  Currency ($, ¥, €)

  Date and Time

 

 

 

   

  

 

Additional Column Settings

Specify detailed options for the type of information you selected.

   Description:

 

 

 

   Require that this column contains information: 

  Yes      No

 

   Number of lines for editing: 

 

 

   Specify the type of text to allow:

  Plain text   

  Rich text (Bold, italics, text alignment, hyperlinks)

  Enhanced rich text (Rich text with pictures, tables, and hyperlinks)

 

   Append Changes to Existing Text

  Yes      No

Ron Johnson Systems Administrator Michigan State University Federal Credit Union Office – (517) 333-2391 [email protected] WWW.MSUFCU.ORG


Thursday, September 10, 2015 6:16 PM ✅Answered

Based on that, it looks like you're using a Multiline of text field (any reason you don't just use Single Line?). That said, there are some solutions out there:

http://sharepoint.stackexchange.com/questions/37162/sharepoint-multiple-line-of-text-char-limit

Trevor Seward

        

This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.


Thursday, September 10, 2015 6:25 PM ✅Answered

I switched it to Single Line of Text and lowered the character limit but, the column still shows a ton of data. Is there a way to limit the character view for the column?

Ron Johnson Systems Administrator Michigan State University Federal Credit Union Office – (517) 333-2391 [email protected] WWW.MSUFCU.ORG


Sunday, September 13, 2015 3:18 AM ✅Answered

Hello RonJohnMSU,

If I understand correctly, you want to change the display of a list. Because you have a lot of characters in one of the columns, list doesn’t look good, you need to scroll to right.

You can limit the characters displayed in a column and show the rest in a tool tip.

Here is how my list looks like:

You can achieve it by using JSLink. JSLink files have ability to change how list views and forms are rendered more specifically how the fields in the list should be displayed.

 

Here is a JSLink sample to display column text shorter:

https://code.msdn.microsoft.com/office/Client-side-rendering-code-93e7077d

Here is more information about JSLink:

http://www.learningsharepoint.com/2013/04/13/sharepoint-2013-js-link-tutorial

 

Thank you


Thursday, September 17, 2015 4:25 PM ✅Answered

This worked. Thanks!

Ron Johnson Systems Administrator Michigan State University Federal Credit Union Office – (517) 333-2391 [email protected] WWW.MSUFCU.ORG


Thursday, September 10, 2015 6:01 PM

It just pasted code when I did a copy and paste. I can see the 255 in the code but, how do I change it. I only have out of the box options in the site settings.

Ron Johnson Systems Administrator Michigan State University Federal Credit Union Office – (517) 333-2391 [email protected] WWW.MSUFCU.ORG


Thursday, September 10, 2015 6:03 PM

See the highlighted portion:

Trevor Seward

        

This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.


Thursday, September 10, 2015 6:12 PM

My screen shot will not post

Ron Johnson Systems Administrator Michigan State University Federal Credit Union Office – (517) 333-2391 [email protected] WWW.MSUFCU.ORG