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) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 3.4 and 4.0 Releases Testing »
  • Contact Ref Field munted - autocomplete works but saving set cid to single digit
Pages: [1]

Author Topic: Contact Ref Field munted - autocomplete works but saving set cid to single digit  (Read 3323 times)

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Contact Ref Field munted - autocomplete works but saving set cid to single digit
March 27, 2011, 01:46:32 am
Just trying the new Contact Ref Field in D7

So i put in the name in Autocomplete and it fills and replaces with cid: 624

When I saved, the field showed no data - so i Edited and saw the field was now showing cid: 6

And no there isn't a civicrm record for Id 6 - i guess if there was it would just be showing the wrong result, not a blank field

And just tested that - saved using a contact whose id = 102 and it saved as id=1 ie Inner City Arts

Might the field be set to being a single digit?

Had a snoop around in field_config table and see

data    longblob          Binary - do not edit (862 B)

Not sure i can shed anymore light on this. Anyone able to help?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Rajan Mayekar

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 20
    • Rajan's Blogs
Re: Contact Ref Field munted - autocomplete works but saving set cid to single digit
March 27, 2011, 08:57:11 pm
Hi,
looks like a bug, can u please file an issue regarding this.
In D6 we are using CCK api to build the contact reference field. Now for D7 we have a form api, so this module ( for CiviCRM4.X) using form api.

Rajan

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Contact Ref Field munted - autocomplete works but saving set cid to single digit
March 27, 2011, 09:05:56 pm
Cool - done - http://issues.civicrm.org/jira/browse/CRM-7836
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Rajan Mayekar

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 20
    • Rajan's Blogs
Re: Contact Ref Field munted - autocomplete works but saving set cid to single digit
March 31, 2011, 02:18:16 am
Issue CRM-7836, has been fixed. There was minor issue while saving the auto-complete fields.
You can check the diff here
https://fisheye2.atlassian.com/viewrep/CiviCRM/branches/trunk.d7/drupal/modules/civicrm_contact_ref/civicrm_contact_ref.module?r1=32613&r2=33466.

Thanks,
Rajan

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Contact Ref Field munted - autocomplete works but saving set cid to single digit
March 31, 2011, 02:37:45 am
cool - thanks rajan - will grab the code and confirm it resolves the problems we hit

pete
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Contact Ref Field munted - autocomplete works but saving set cid to single digit
April 08, 2011, 02:17:17 am
hey rajan

just spotted that on my D7 i don't have the option to set the "Number of values:" - but I did have this in D6

Any thoughts?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Rajan Mayekar

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 20
    • Rajan's Blogs
Re: Contact Ref Field munted - autocomplete works but saving set cid to single digit
April 08, 2011, 04:27:00 am
Yeah, intentionally we did that for autocomplete element. Currently unlike to the CCK API, Form API do not provide separate autocomplete field for each value ( ie Number of values). For drupal7 autocomplete field is very much compatible to the tags, so we can put multiple tags with comma (,) separator but for CiviCRM comma (,) can be the part of contact name ( also we use comma for sort name too).
So to make this thing simple for CiviCRM, I just allowed single value for each autocomplete element by considering that user will add separate autocomplete field whenever he wants multiple contact references using autocomplete field.
Any suggestion regrading this?

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Contact Ref Field munted - autocomplete works but saving set cid to single digit
April 09, 2011, 12:31:29 am
Thanks for that reply Rajan - well that certainly poses a problem for us

Use Case: a news item is created that references 3 Contacts - or 6 contacts - and we want each of those to be added to that Node so we can then show that node on their pages.

I don't want to put in eg 6 fields just in case. The previous option of being able to unset the amount and therefore allow Editors to 'add more' was great.

If D7 has shifted the goal posts on how to do this then hopefully we can find a route through this.

Certainly D7 does provide the "Number of values: Maximum number of values users can enter for this field." for other field types (just needed to clarify that for myself)

So I take it that the change in the Form API is tripping us up on this?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

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: Contact Ref Field munted - autocomplete works but saving set cid to single digit
April 09, 2011, 07:44:16 am

hey pete:

if any fuzion developer(s) can take a look at this and push it forward that would be great and help the community (and your use case!!)

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

torrance123

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 3
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.0.91
  • PHP version: 5.3.3
Re: Contact Ref Field munted - autocomplete works but saving set cid to single digit
April 11, 2011, 08:41:18 pm
I had a go at adding multiple value support for this contact field, though to be perfectly honest I'm struggling to understand the fields API and autocomplete.js.

See this issue: http://issues.civicrm.org/jira/browse/CRM-7904

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Contact Ref Field munted - autocomplete works but saving set cid to single digit
April 11, 2011, 09:01:18 pm
I have seen it with my own eyes and i declare it to be good - but will let others comment on the code - but good work getting this firing Mr T.
« Last Edit: April 12, 2011, 12:13:42 pm by petednz »
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Rajan Mayekar

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 20
    • Rajan's Blogs
Re: Contact Ref Field munted - autocomplete works but saving set cid to single digit
April 12, 2011, 06:36:42 am
Thanks a lot!
Patch is working great :)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 3.4 and 4.0 Releases Testing »
  • Contact Ref Field munted - autocomplete works but saving set cid to single digit

This forum was archived on 2017-11-26.