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) »
  • Creating a new contact when using a contact reference field in custom field set
Pages: [1]

Author Topic: Creating a new contact when using a contact reference field in custom field set  (Read 572 times)

lolas

  • I post frequently
  • ***
  • Posts: 134
  • Karma: 9
    • Freeform Solutions
  • CiviCRM version: Several
  • CMS version: Drupal
  • MySQL version: 5.1+
  • PHP version: Several
Creating a new contact when using a contact reference field in custom field set
March 04, 2013, 05:35:21 am
I have a contact reference field in a group of custom fields added as a tab on the contact page. When adding this group there are times when the user wants to add a new contact on the fly in the same way that you can when you're adding a relationship. Has anyone come up with a workaround for this case by putting a custom add button on the form for example?
Freeform Solutions provides technology and management consulting, website and database development, and managed internet hosting solutions for not-for-profit organizations (NFPs).

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: Creating a new contact when using a contact reference field in custom field set
March 04, 2013, 06:43:25 am

If this is on a backend form, you can mimic the relationship code (or other places) to do the same

for frontend forms, it gets a bit more complicated, as permissions come into play

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

lolas

  • I post frequently
  • ***
  • Posts: 134
  • Karma: 9
    • Freeform Solutions
  • CiviCRM version: Several
  • CMS version: Drupal
  • MySQL version: 5.1+
  • PHP version: Several
Re: Creating a new contact when using a contact reference field in custom field set
March 04, 2013, 08:29:58 am
Thanks for the reply. I guess we'll give it a try and post questions as we go along.
Freeform Solutions provides technology and management consulting, website and database development, and managed internet hosting solutions for not-for-profit organizations (NFPs).

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: Creating a new contact when using a contact reference field in custom field set
March 04, 2013, 12:13:58 pm
fwiw in case it helps you, webform-civicrm module can provide an autocomplete which lets the user also 'create new contact' if an existing one is not found
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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Creating a new contact when using a contact reference field in custom field set

This forum was archived on 2017-11-26.