I need this module because I need to see the number of characters in the field, but I don't need to limit the length. I can specify maxlength as 99999 or something, but I would like to be able to just display the counter in the desired field. Thank you!
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | interdiff-2329441-2-5.txt | 1.05 KB | jeroent |
| #5 | unlimited_field_just_a-2329441-5.patch | 1.79 KB | jeroent |
| #2 | unlimited_field_just_a-2329441-2.patch | 1.79 KB | jeroent |
Comments
Comment #1
damienmckennaThat would be useful for integration with e.g. Metatag (#1918738: Character count on fields via Maxlength integration (D7)).
Comment #2
jeroentI created a simple initial patch for this. I added a new element to the form 'maxlength_js_limit'.
How to test? Add maxlength_js and maxlength_js_limit to your form element :
I add the 'maxlength_js_limit' as a data-attribute on the form element and in javascript, I check if this data-maxlength-js-limit attribute exists. When it exists, I set the enforce option to false.
What do you think? Any suggestions?
Comment #3
seanbSeems to work fine! +1
Comment #4
damienmckennaOne minuscule thing - the "if" statements should have a space after them for both files to match the Drupal coding standards.
Comment #5
jeroentAdded the code styling updates.
Comment #6
jeroentComment #7
weri commentedThis is related to #1841028: Add field setting "Do not restrict maxlength on writing"
Comment #8
damienmckenna@weri: The link you provided was to this issue, did you mean to link to a different one?
Comment #9
weri commentedThank you @DamienMcKenna for the hint!! I linked now the correct issue.
Comment #10
cedeweyWe are putting a feature freeze on the Drupal 7 version of the module, so I'm marking this Closed, won't fix. Thank you everyone for working on this issue. If you do want to maintain the Drupal 7 version, do reach out. We'd be happy to bring you on board as a maintainer.
Also, this is a feature that exists in the Drupal 8/9 version so I do encourage people to upgrade to Drupal 8/9 and enjoy this enhancement along with the many other benefits of the latest version of Drupal.