I have a use case to send emails to the editors of over 30 publications for a local activism campaign. It's a multiple select, and the textarea for Options allows me to enter as many publications as needed. However, the Default field cuts off anything beyond 256 characters (without notifying the user this is happening). I need all of the publications in my list to be included by default. Is this a genuine database limit, or can this be modified in select.inc so we can have all items checked by default?
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | webform_maxlength_default.patch | 1.36 KB | quicksketch |
Comments
Comment #1
quicksketchActually the default value is not "cut-off", it's just not allowed to be entered. The field itself will stop accepting characters after 256 characters, so had you been typing the options it would have been much more clear that it was no longer accepting more defaults. When you copy/paste the list of defaults however, characters that don't fit just aren't included in the field.
We actually already increased the limit once from 128 characters (the normal Drupal system default) to 256 characters already, but I agree that a larger default could be helpful. The database itself is capable of storing very large defaults (32,000 or more), the limit in place is mostly to prevent accidental long values.
I've increased the maxlength 4 times to a limit of 1024. In the future you might be able to reduce the need for long default values by using shorter keys in your list of options.
Comment #2
narayanis commentedIs there a better way to go about what I'm trying to accomplish? I don't even want the users to be presented with the list of emails if I can have it sent to the entire list automatically (one at a time, of course).