Add characters counter of the text fields

Use this procedure to add character counters to text fields. When you have a counter on a text field, the counter shows the length of the entered text while you type. You can also specify the number of the recommended characters count. When you enable this function, it reminds you for the recommended characters count. If you exceed it, the counter will turn red, but will not restrict you from entering or saving long values into the fields.

By default, the counters are enables for the following fields:

  • Pages » Create or Edit page » Title for search engines field and Descriptionfield.
  • Image Widget » Create or Edit dialog » Title field and Alternative textfield.

Configure the Characters counter for custom fields

You can enable character counter on any field.

Following is an example of how to enable the character counter on the Titlefield of the Editdialog of the Newsmodule:

  1. Click Administration» Settings » Advanced.
  2. In the tree in the left, click News» Controls» NewsBackend» Views»NewsBackendEdit» Sections» MainSection» Fields» Title.
  3. Select the Show Character Counter checkbox
  4. In Recommended Characters Count, enter, for example, 70.
  5. In CharacterCounterDescription, enter, for example, Less than {0} characters are recommended.
  6. Click Save Changes button.

If you click Content » Newsand choose to edit a news item you will see that the character counter is configured, based on the data you have provided.

NOTE: Most of the modules, like the Newsmodule, have different dialogs for the creating and edit functions. In order to keep the consistency, we recommend enabling the character counters for both NewsBackendInsertand NewsBackendEditviews.

Want to learn more?
Enhance your Sitefinity skills by enrolling in free training sessions. Become Sitefinity certified through Progress Education Community to strengthen your professional credentials.