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".

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cardpages’s picture

You can set the limit in the options_elements.module file.

barraponto’s picture

@cardpages are you suggesting modifying a contributed file?

ashooner’s picture

Version: 7.x-1.8 » 7.x-1.9
Status: Active » Needs review
FileSize
414 bytes

Here's a quick patch to remove the default limit.

JCheng’s picture

I am new to Drupal. Is it possible you can tell me where should I insert the patch?

Thank you

barraponto’s picture

Vietyank’s picture

Is there any plan for a UI to modify this limit rather than patch it?

quicksketch’s picture

Hi 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.

quicksketch’s picture

Issue summary: View changes
Status: Needs review » Fixed

I've set the default value on this field to be NULL (essentially the same effect as ashooner and rtrubshaw's patches).

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.