CharacterCount

uk.gov.hmrc.govukfrontend.views.viewmodels.charactercount.CharacterCount
See theCharacterCount companion object
case class CharacterCount(id: String, name: String, rows: Int, spellcheck: Option[Boolean], value: Option[String], maxLength: Option[Int], maxWords: Option[Int], threshold: Option[Int], label: Label, hint: Option[Hint], errorMessage: Option[ErrorMessage], formGroup: FormGroup, classes: String, attributes: Map[String, String], countMessageClasses: String, charactersUnderLimitText: Option[Map[String, String]], charactersAtLimitText: Option[String], charactersOverLimitText: Option[Map[String, String]], wordsUnderLimitText: Option[Map[String, String]], wordsAtLimitText: Option[String], wordsOverLimitText: Option[Map[String, String]], textareaDescriptionText: Option[String])

Parameters to GovukCharacterCount Twirl template

Value parameters

attributes

optional additional HTML attributes to apply to the textarea

charactersAtLimitText

optional text to display when the character count is at the limit

charactersOverLimitText

optional text to display when the character count is over the limit

charactersUnderLimitText

optional text to display when the character count is under the limit (defaults to "You can enter up to {maxLength} characters")

classes

optional additional CSS classes to apply to the textarea

countMessageClasses

optional additional CSS classes to apply to the max length/word count message

errorMessage

optional ErrorMessage to display

formGroup

additional CSS classes/attributes/etc. to apply to the form group

hint

optional Hint for the control

id

the id of the textarea element

label

optional Label for the control

maxLength

optional maximum length, in characters, of the text in the textarea

maxWords

optional maximum number of words in the textarea

name

the name of the textarea element

rows

height of the textarea in rows

textareaDescriptionText

optional text to display under the textarea

threshold

optional threshold, in characters, for the textarea

value

optional initial value of the textarea

wordsAtLimitText

optional text to display when the word count is at the limit

wordsOverLimitText

optional text to display when the word count is over the limit

wordsUnderLimitText

optional text to display when the word count is under the limit (defaults to "You can enter up to {maxWords} words")

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product