Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
drupalnuts CreditAttribution: drupalnuts commentedComment #2
AaronBauman128 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.
Comment #3
As If CreditAttribution: As If commentedYou 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.
Comment #4
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commentedI would try quiz or webform module for this case.
Comment #5
amateescu CreditAttribution: amateescu commentedI don't think this feature will be accepted into D7, but it should be discussed for D8.
Comment #6
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commented#1266336: Modernize Poll module could fix this.
Comment #7
alexpottPoll is no longer part of core
Comment #8
adammalonePoll choice is set at 512 for the max length. Closing this and marking as resolved.