In the poll module install we have this

'chtext' => array(
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
'default' => '',
'description' => 'The text for this choice.',
),

This should allow for a length of 128. If users wish to restrict it they should use form API.

Comments

drupalnuts’s picture

Version: 6.16 » 7.0-alpha5
AaronBauman’s picture

Title: poll should not limit choice size at database » Increase database storage size for poll choice text
Version: 7.0-alpha5 » 7.x-dev
Category: bug » feature

128 seems like a reasonable length.
What do you propose? A 255 varchar?
Using a longtext db field instead?

The Poll module is lightweight, which means sacrificing some flexibility.
A 255+ character choice would not fit very well in a left sidebar block, y'know?

If you need more than 128 characters for a single poll choice, maybe you can provide a better description on the poll node, or check out webform.

Bumped to 7.x-dev for discussion.

As If’s picture

You may not be considering all the various uses the Poll functionality can be put to. Just because the module is named "Poll" does not mean that's the only possible application for it. Sometimes the "Question" may be a statement, sometimes a paragraph. Same goes for the answers. I would prefer a solution allowing the admin to set the length limits for both questions *and* answers on a site-by-site basis. The best module is the one which allows the most flexibility and creativity in application.

Sivaji_Ganesh_Jojodae’s picture

Sometimes the "Question" may be a statement, sometimes a paragraph. Same goes for the answers. I would prefer a solution allowing the admin to set the length limits for both questions *and* answers on a site-by-site basis.

I would try quiz or webform module for this case.

amateescu’s picture

Version: 7.x-dev » 8.x-dev

I don't think this feature will be accepted into D7, but it should be discussed for D8.

Sivaji_Ganesh_Jojodae’s picture

alexpott’s picture

Project: Drupal core » Poll
Version: 8.x-dev » 8.x-1.x-dev
Component: poll.module » Code

Poll is no longer part of core

adammalone’s picture

Issue summary: View changes
Status: Active » Fixed

Poll choice is set at 512 for the max length. Closing this and marking as resolved.

Status: Fixed » Closed (fixed)

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