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 Profiles (Moderator: Dave Greenberg) »
  • How to add multiple website fields to a profile?
Pages: [1]

Author Topic: How to add multiple website fields to a profile?  (Read 10868 times)

mdavid

  • I post occasionally
  • **
  • Posts: 31
  • Karma: 0
  • CiviCRM version: 4.2
  • CMS version: Drupal 7.15
  • MySQL version: 5.1.63
  • PHP version: 5.2.17
How to add multiple website fields to a profile?
February 16, 2011, 01:11:34 am
Is there a way to include multiple website fields in a profile?

When I create a new contact or edit an existing one on the back end, the Contact Details section has an "add" link to add additional website fields and assign each one a different website type, so each contact can have URLs designated for Work, Facebook, Twitter, etc.

However, when I create the profile that people will use as part of the membership application, I can only add the website field once. There appears to be no option to enable people to add a second or third web site to their profile.

I've read the section on Profiles on the Wiki and searched the forums and haven't found an answer to this.

Is there a way to enable users to add multiple website fields to their contact details using a profile?

Thanks,
Michael

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: How to add multiple website fields to a profile?
February 16, 2011, 06:20:51 am

no

you'll need to do this with custom coding (hooks +  customized templates)

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

Dwiding

  • I post frequently
  • ***
  • Posts: 165
  • Karma: 8
  • CiviCRM version: 3.3.3
  • CMS version: Joomla 1.5.x
Re: How to add multiple website fields to a profile?
February 17, 2011, 10:30:42 am
I found the easiest way to do this is add custom fields for additional WebSites.

Hope that helps....

D

mdavid

  • I post occasionally
  • **
  • Posts: 31
  • Karma: 0
  • CiviCRM version: 4.2
  • CMS version: Drupal 7.15
  • MySQL version: 5.1.63
  • PHP version: 5.2.17
Re: How to add multiple website fields to a profile?
February 17, 2011, 01:15:36 pm
@Donald Lobo - Thanks for the reply. Do you have any examples? Am I on the right track if I look at using hook_civicrm_buildForm and create custom templates for CRM/Profile/Form/Dynamic.tpl and CRM/Profile/Page/Dynamic.tpl?

@Dwiding - Thanks for the suggestion! I may end up doing that.

I'm getting better at customizing templates. Writing hooks is still a challenge.

Although creating custom fields for additional web sites seems like a duplication, since those fields already exist for contacts, if I can't figure out the hooks process, creating custom fields is a helpful alternative until I learn more.

Thanks,
 Michael

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: How to add multiple website fields to a profile?
February 17, 2011, 07:50:19 pm

http://en.flossmanuals.net/CiviCRM/DevelopIntro
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

ToddW

  • I’m new here
  • *
  • Posts: 16
  • Karma: 1
Re: How to add multiple website fields to a profile?
March 14, 2011, 10:16:13 am
I'm having a similar issue. Seems like this might be considered a bug. If you add Website field to a profile listing, it will produce duplicate rows for a contact with multiple websites. For my use (member directory), it would be nice if the Profile admin area let you choose the website type (as email, address, phone).

ToddW

  • I’m new here
  • *
  • Posts: 16
  • Karma: 1
workaround Re: How to add multiple website fields to a profile?
May 09, 2011, 02:13:56 pm
Looked into modifying the core code and it doesn't look like a trivial fix.

But I found a workaround that will work with Profiles and Views. (Seems pretty obvious once it dawned on me.)
Simply use custom fields to store the URLs instead of the built-in website fields.
Go to civicrm/admin/setting/preferences/display&reset=1 and turn off 'website'. Then, add a custom field for each type of URL you need to collect/display. Now add your custom fields to your Profile or View.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • How to add multiple website fields to a profile?

This forum was archived on 2017-11-26.