Hey there!
I was wondering if it would be easily possible to allow textarea widgets provided by this module to be used with (single row) text fields? The idea would be to basicly enable the stuff that "Textarea widget for text fields" (https://www.drupal.org/project/textarea_widget_for_text) module does, but with counter.
I currently have been using the "textarea widget for text fields" widget for certain text fields with a limited number of characters (usually some kind of short summary fields with max chars at 255), but the counter would be awesome to use too. Sadly I can't use both as far as I know. I did check that module is extremely simple so merging the two propably shouldn't be too much of a problem, but to be honest I have no idea how to do this.
It might not be the main goal of this module, but I think that would be nice add to the functionality. And it is very closely related to the module name, as in we are just talking about adding different widget with counter to text field. If it is not possible to add this to the module, is there some way to get this done via patching or manually editing the source code?
Comments
Comment #2
phonkala commentedComment #3
phonkala commentedThis was actually really simple to achieve now that I found the time. I just created a new custom module and added hook_field_widget_info_alter() into it as follows:
This way I can add plain text fields (single row) with limit for maximum characters, and still make it use textarea with counter widget.