CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Bug: Custom Data Fields - Field length too small (confirmed)
Pages: [1]

Author Topic: Bug: Custom Data Fields - Field length too small (confirmed)  (Read 2930 times)

ansm

  • Guest
Bug: Custom Data Fields - Field length too small (confirmed)
June 11, 2008, 10:44:29 am
I'm at Home › CiviCRM › Administer CiviCRM › Custom Data
I'm using sandbox (as of June 12, 2008)
I'm adding a Custom Field.  This field has multiple choice options.  I'm entering an option.
For options, the text of each option seems limited to 64 characters.  This is far too small for my choices.  The only thing I can do is put some explanation in the help boxes.  This is not the best presentation I'd like.  Here's an example of real-life use:

Which category do you fall under?
a) Non-Profit Organization (*A non-profit organization is defined as an organization registered with your countries' tax authority as being primarily a non-commercial operation)
This gets cut off: "a) Non-Profit Organization (*A non-profit organization is define"
« Last Edit: June 12, 2008, 07:20:34 am by ansm »

tmcnulty1982

  • Guest
Re: Bug: Custom Data Fields - Field length too small (confirmed)
June 17, 2008, 10:36:09 am
This is also an issue for us.  A client of ours is trying to create a list of numbered yes/no questions.  The questions are too long to add as field labels.  We either need to (a) increase the limit on field label length, or (b) figure out a way to show the field help text when /viewing/ the responses to the questions.  Are either of these possible?

Thanks,
Toby

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Bug: Custom Data Fields - Field length too small (confirmed)
June 17, 2008, 03:35:35 pm
Makes sense to increase DB column lengths for both of these elements - custom field labels and multiple choice option labels.

I've filed an issue and fixed this in 2.1: http://issues.civicrm.org/jira/browse/CRM-3217

Columns modified ( to varchar(255) ) are: civicrm_custom_field.label, civicrm_option_value.label

I didn't make any changes other than the schema update and things worked ok - so you can probably "backport" this to 2.0 by running alter table commands on those two columns (of course do this in a test db copy first :-) ).


Protect your investment in CiviCRM by  becoming a Member!

sfcalison

  • Guest
Re: Bug: Custom Data Fields - Field length too small (confirmed)
June 25, 2008, 12:01:39 pm
Thank you for increasing the field label character length.  Would it be possible to make it 300 instead of 255? 
We will be posting our application within this custom data and need to type the full questions within the field label.
Let me know if there is another solution.  Thank you.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Bug: Custom Data Fields - Field length too small (confirmed)
June 26, 2008, 09:25:54 am
255 is the maximum length for columns of type "varchar" in MySQL versions 5.0 - 5.0.3. In 5.0.3 this has been increased - but for now we are requiring 5.0+ so I think we need to leave this at 255 for now. Hopefully you can use the "help" column to supplement the text you need.
Protect your investment in CiviCRM by  becoming a Member!

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Bug: Custom Data Fields - Field length too small (confirmed)
July 07, 2008, 03:52:27 am
Hi,

same need here on the price set here.

Have you tried the alter table solution  ? Could you post the sql you've applied ?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Bug: Custom Data Fields - Field length too small (confirmed)
July 07, 2008, 10:34:19 am
I've updated CRM-3217 to include increasing col lengths for Price Set titles and Price Field labels.

The alter table statements for all tables are:

Code: [Select]
ALTER TABLE `civicrm_custom_field` MODIFY `label` VARCHAR(255) NULL DEFAULT NULL COMMENT 'Text for form field label (also friendly name for administering this custom property).';
ALTER TABLE `civicrm_option_value` MODIFY `label` VARCHAR(255) NULL DEFAULT '' COMMENT 'Option string as displayed to users - e.g. the label in an HTML OPTION tag.';
ALTER TABLE `civicrm_price_set` MODIFY `title` VARCHAR(255) NULL DEFAULT NULL COMMENT 'Displayed title for Price Set.';
ALTER TABLE `civicrm_price_set` MODIFY `name` VARCHAR(255) NULL DEFAULT NULL COMMENT 'Variable name/programmatic handle for this set of price fields.';
ALTER TABLE `civicrm_price_field` MODIFY `label` VARCHAR(255) NULL DEFAULT NULL COMMENT 'Text for form field label (also friendly name for administering this field).';
ALTER TABLE `civicrm_price_field` MODIFY `name` VARCHAR(255) NULL DEFAULT NULL COMMENT 'Variable name/programmatic handle for this field.';
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Bug: Custom Data Fields - Field length too small (confirmed)

This forum was archived on 2017-11-26.