Skip to main content

Filter: gform_text_counter_template

Dynamic Hook Name

This hook supports dynamic naming with the following modifiers:

  1. $field->formId
  2. $field->id

Example hook names:

  • gform_text_counter_template (base hook)
  • gform_text_counter_template_1 (with first modifier value)
  • gform_text_counter_template_1_2 (with all modifier values)

Filters the text counter template.

The template supports the following variables: {current} and {max} and {remaining} {current} - The current number of characters entered. {max} - The maximum number of characters allowed. {remaining} - The number of characters remaining.

Parameters

NameTypeDescription
$default_templatestringThe text counter template.
$form_idintThe current Form ID.
$field\GF_FieldThe current Field object.

Since

Source

Defined in includes/fields/class-gf-field-text.php at line 197