The number of states in the UN is 192, so we have already exceeded the arbitrary 100 limit without half-trying.
The limit causes problems when the module is installed with the form builder and form builder webform UI modules with existing webforms that have select fields with more than 100 options already, as they cease to be accessible for editing purposes.
It appears almost impossible to change the limit once the module has been installed (and I have tried uninstalling the module and all dependent modules), and I have been reduced to commenting out the limit checking code in options_element.inc to allow existing select fields to be edited.
Please can you remove this limit, i.e. set '#limit' => 0, in hook_info()?
I can't see a point to the limit in the first place and certainly not one as low as "100".
Comment | File | Size | Author |
---|---|---|---|
#3 | 1865626-default-to-no-limit-for-maximum-number-of-options.patch | 414 bytes | ashooner |
Comments
Comment #1
cardpages CreditAttribution: cardpages commentedYou can set the limit in the options_elements.module file.
Comment #2
barraponto CreditAttribution: barraponto commented@cardpages are you suggesting modifying a contributed file?
Comment #3
ashooner CreditAttribution: ashooner commentedHere's a quick patch to remove the default limit.
Comment #4
JCheng CreditAttribution: JCheng commentedI am new to Drupal. Is it possible you can tell me where should I insert the patch?
Thank you
Comment #5
barraponto CreditAttribution: barraponto commented@JCheng https://drupal.org/patch/apply
Comment #6
Vietyank CreditAttribution: Vietyank commentedIs there any plan for a UI to modify this limit rather than patch it?
Comment #7
quicksketchHi guys, thanks for the input here. I agree that 100 items is arbitrary. I think I originally added it to demonstrate the validation ability, but we can keep the option and validation but just remove the default (though we should set it to a NULL value so people know the option exists). I'll address this along with the other current patches in the queue today.
Comment #8
quicksketchI've set the default value on this field to be NULL (essentially the same effect as ashooner and rtrubshaw's patches).