Jump to content

Letter or word count.


buster808
 Share

Recommended Posts

Hi.

I have the below, is there a way to add letter or word count.

    $field = $this->modules->get('InputfieldTextarea');
      $field->name = 'action';
      $field->label = 'Action:';
      $field->value = $p->action;
      $field->columnWidth = 100;
      $fieldset->add($field);

Thanks

Link to comment
Share on other sites

Moderator note: this is not a module support thread, so I'm moving it to the General Support area of the forum instead. Please keep in mind that the Modules/Plugins area is only intended for module-specific support threads. Thanks!

  • Like 1
Link to comment
Share on other sites

This should work:

// char counter:
$field->set('showCount', InputfieldText::showCountChars);

// or ALTERNATIVELY word counter:
$field->set('showCount', InputfieldText::showCountWords);

 

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...