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 »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • UFGroup API Bug
Pages: [1]

Author Topic: UFGroup API Bug  (Read 1123 times)

johng

  • Guest
UFGroup API Bug
January 18, 2010, 12:29:24 am
The UFGroup API is a great API that has helped me tremendously. However, I did find what I would consider to be a small bug when using the civicrm_uf_field_create($UFGroup, $params) function. When a profile has more then one phone type (say phone and fax,) they should both have the value of "phone" for the "field_name" field. However, the 2nd one will error out with an error message that a duplicate value already exists for the profile. Since "name" is required to be set as "phone" to make things work on the frontend, this means having to do a workaround such as initially setting the field_name to fax for the 2nd "phone" and then manually changing it to "phone" in the database.

Am I missing some way around setting the "field_name" to "phone" for all phone types? This is what happens when they are done manually from the admin, and using the workaround posted above works fine.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: UFGroup API Bug
January 18, 2010, 02:03:44 am
Hi,

What are the ids of the fax & phone in the profile html form ? It's often the same ones as what it used in the APIs.

X+

P.S. Why do you use the profile api instead of the contact one ?
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

johng

  • Guest
Re: UFGroup API Bug
January 18, 2010, 07:16:49 am
I am using these to automate a generic install of a search profile used on a number of sites. This specific instance is a directory listing of all members of a particular type. There is no form until I do this ;)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • UFGroup API Bug

This forum was archived on 2017-11-26.