Rewrite of _maxlength_format_element
dereine - April 3, 2009 - 15:05
| Project: | Maxlength |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
I would rewrite _maxlength_format_element to remove drupal_add_js settings.
I think the bevahior of maxlength should be attached to the formelement directly.
This would have quite some advantages:
much less arguments in this function
easier to handle for other forms, comments...contact etc.
new paramater: $js = TRUE
But:
_maxlength_get_values should be remove and be there as parameter
Perhaps put the validate stuff in another validate function, perhaps could be possible to use form_set_error, not sure.
Any opinions.
