The char_remain template amends a textbox
question with a JavaScript module to display characters remaining until the maximum is reached, as defined by a maxlen
tag. If no maxlen
tag is included, the textbox will default to a max of 5000 characters.
Syntax
Include the template
tag to use char_remain.
|
Parameters
The text surrounding the remaining count can be customized via the template data
tag using the following parameters:
Option
|
Example
|
Description
|
---|---|---|
remain_text |
templatedata: {remain_text => 'You have {{count}} more {{chars}} left to use.'} |
Text with count as the placeholder for the remaining count and chars for the text "character(s)". |
remain_one |
|
Text here will allow you to override the singular default "character". |
remain_multiple |
|
Text here will allow you to override the plural default "characters" |
Caution! The char_remain template works for a question, not for a table, as seen in the examples in this article. The parser is not going to warn you if the template is incompatible with the question type.
Example
Custom text and remain
|
Comments
0 comments
Please sign in to leave a comment.