Closed (fixed)
Project:
Webform
Version:
6.x-3.12
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Apr 2008 at 13:32 UTC
Updated:
31 Aug 2011 at 17:32 UTC
Jump to comment: Most recent file
Comments
Comment #1
quicksketchNow that we have a Drupal 6 version, I switched the update naming convention to start with 5200 for Drupal 5 and 6200 for Drupal 6. I also increased the #maxlength property on the component form to take advantage of the increased size.
Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #3
joshmillerUsing the latest Webform module, the "webform_components_form" does not specify a #maxlength, so it defaults to 128.
Make a custom a module and put this php in it to fix:
Tested using this 255 string, before this hook_form_alter() it was limited to 128, after it went through as 255 characters.
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
EDIT: I recommend you remove the line-breaks before testing...
josh
Comment #4
quicksketchThis probably should have been a new issue rather than reopening a 3 year-old request... but in any case we can make this change in the main module rather than needing a form alter.
Comment #5
modiphier commentedHello,
I actually need more than 255 characters. I have to create some forms with very large questions. Is it as easy as going into myphpadmin and changing the structure of the following entry?
5 name varchar(255) latin1_swedish_ci Yes NULL Change Drop More
Can I just change varchar(255) to varchar(512) or change the type to text instead of varchar?
Thanks,
Paul
Comment #6
quicksketchNo, because Drupal will still enforce a limit when the user enters in the value into the forms. You'd need to form_alter the form similar to the suggestion in #3 in addition to changing the database.
Comment #7
modiphier commentedOk, well what I did on my test server was I made the change in the database table changing name to varchar(512) then i went into the webform.component.inc and includes/webform.component.inc and changed both instances of name to 512 also. I was then able to enter a question with 372 characters. When I say question I mean some of the fields are First Name, Last Name, etc but then some are multi sentence questions and that was where I was having an issue.
I do not understand the form_alter as you mentioned but I will keep a mental note of my change so if the webform module has an update I will have to remember what I did to keep it right.
Let me know if what I did isn't really ok and I will change it but I needed a fast fix.
google says that mysql 5 varchar can go up to 65535 characters...
Comment #8
quicksketchI've committed this adjustment that permanently makes the change recommended in #3.