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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Custom set/field: we should expose the name
Pages: [1]

Author Topic: Custom set/field: we should expose the name  (Read 502 times)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Custom set/field: we should expose the name
May 26, 2011, 01:41:31 am
Hi,

so it seems that the name is automatically generated munging the label. to solve the api and import issues when the name is too long, I'd suggest

1) to expose the name of the set/group
if empty set name = munge (label)
checking that the result is sane (eg.  < 20 chars)

2) to expose the name of the field
if empty, field name = set.name+"_"+ munging(label)

checking that the result is sane (eg.  < 30 chars)

Where are the field/group name used today ? to generate the name of the column and "only" that ?


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

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Custom set/field: we should expose the name
May 26, 2011, 12:06:00 pm

From the UI it is autogenerated and not changed

from the API the name is used if passed in, else its autogenerated

Once the group/field is created, the name is not changed (there have been bugs in this code, but hopefully most/all of them fixed in 3.4.2)

The current character limit is 64 chars on the name

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Custom set/field: we should expose the name

This forum was archived on 2017-11-26.