title: Trouble with PayPal recurring payments

text:
# Question
Title: Trouble with PayPal recurring payments
Drupal - latest version CiviCRM - 4.7.13

We have a client that uses PayPal standard with recurring payments that having an issue that I can't figure out. The recurring payments seem to have quit working since the first of the year. By quit I mean they are logged but after that nothing seems to happen. No errors and no record of the payment. I have used a test setup where I use curl to resend messages to my local environment while in debug mode but it doesn't work (it does work for authorize.net payments). In this case it seems like the data isn't there when the message is to be processed.

Another interesting thing is that some of the IPNs look like they are resent several times within a few mins. They have the same transaction ID, etc.

Any help or ideas are very much appreciated.

# Answer
> 2 votes
Answering in case this is helpful. The problem was configuration (not informed of PayPal email change). Would have been very quickly solved if *something* was logged vs just discarding the IPN.

---
Tags: payment-processor, paypal
---


title: Uploading null email address

text:
# Question
Title: Uploading null email address
Is there a way to overwrite a Contact's email address with a null value?

I tried uploading contact info (via: Import Contacts) with a blank email field, but this doesn't override an existing email address.

Thanks!

# Answer
> 2 votes
A `NULL` value won't be a valid email address, so you'll struggle to get this into CiviCRM. This is intentional - why store an email that's not valid?

## Remove address by contact edit

Correct procedure is to remove the address you want to get rid of. When editing a contact, you should be able to click on the email section, delete the text in the email field, and hit save.

Does that solve your problem? Your question doesn't indicate why you'd want to store a `NULL` instead of just deleting the relevant email entry.

## Remove addresses by SQL

Since you say you have a bunch of "bad" addresses, you can remove them via SQL. Accessing the underlying data in CiviCRM may have risks (eg other data might be associated with an address you delete), so this should be done with caution. Here's the SQL command to delete emails `none@none.com`

```
DELETE FROM civicrm_email WHERE email='none@none.com';

```

(If anyone can suggest issues to this approach, please do so in comments?)

## Remove addresses via API

You can also use the API - slightly more complex, but you're updating CiviCRM via its proper interfaces and it will be better able to handle the business logic around removing related data.

There's an API explorer in CiviCRM at `civicrm/api/explorer`, and using the tools there you can compose API commands to do what you want. Example code is given in the API explorer for javascript, PHP etc. For example, to find then remove addresses `none@none.com` using javascript (works from browser console if logged in with appropriate rights).

```
CRM.api3('Email', 'get', {
  "sequential": 1,
  "email": "none@none.com",
  "options": {"limit":0}
}).done(function(result) {
  result.values.forEach(function(email) {
    CRM.api3('Email', 'delete', { "id": email.id });
  });
});

```

You could use the sample PHP provided there instead, via a custom extension or module.

# Answer
> 2 votes
Elaborating on Chris's great answer (and based on your clarification of what you're looking for): you can delete all instances of a particular email address directly from the API explorer with chaining; no need to use Javascript or PHP. Navigate to `civicrm/api/explorer` and enter the following values:

Then hit "Execute".

As with any operation that may affect a large number of records, it wouldn't be a bad idea to make a backup of your database first, no matter which one of these methods you use.

---
Tags: contacts
---


title: First time donor report

text:
# Question
Title: First time donor report
I am trying to pull a first time donor report. I am using the Repeat Contributions report. I set the Initial Date Range as custom from beginning to Dec 31, 2016. The Second Date Range is This Year. I set Range 1 Amount as Less than 1 and the Range 2 Amount as Greater than 1. It shows 0 results. I tried several different combos (Is not Null/Is null, etc). All combos I tried either show 0 or they show all donors. Can I use this report to show first time donors? Those that did not give in the previous period but gave in this period.

ps. I know that I have new donors, so with the right polling, I should see results.

# Answer
There's actually a way to specifically run a "First Time Donors" report, though it's a little hidden.

* Go to **Reports menu » Contribution Reports**.
* Select "Contribution Details Report".
* Under the "Filters" tab, set "Contribution Ordinality" to "First by Contributor" to only show first-time donors.
> 3 votes

# Answer
You may want to get the Summary Fields extension. That calculates fields like 'Date of First Contribution' which are very helpful for such reporting

---
> 2 votes

---
Tags: civicontribute, reports
---


title: Bug in the data import wizard

text:
# Question
Title: Bug in the data import wizard
We need to daily export all donation data from CommitChange and import the data to civicrm using the data import wizard. So the process is:

Map the appropriate donation fields to civicrm fields and then import donation information from the CSV file. In each case the name of the donation field is "Total Amount."

According to CiviCRM the donation data is successfully imported. However, in every record, the amount of the donation is stored in CiviCRM as "$0". I do not have the coding skills needed to fix the bug or to write a custom script to import the data, so any help is appreciated.

Drupal 7.53 with CiviCRM 4.7.14 also tested on CiviCRM 4.7.13 on a different Drupal site

# Answer
> 1 votes
Try doing an export of the data from civi of the fields you want to import just to verify you have the data in the expected data formats

EDIT (from Andrew's comment above)

The problem is that CiviCRM exports (and imports) data in a CSV file in which every cell is formatted "general," while CommitChange exports donation amount as formatted "currency." Problem solved.

# Answer
> 0 votes
Quick thought: Total Amount should just be an integer - so don't import $8 but 8.

Doing this daily is a real chore - CiviCRM has was to help automate such tasks - like civicrm rest API.

---
Tags: civicontribute, import
---


title: civicrm_processProfile hook ignored

text:
# Question
Title: civicrm_processProfile hook ignored
After submitting the profile with success from the front-end of the site, a civicrm contact is created but the following hook is not working..

```
function wordpress_civicrm_processProfile($name) {
        if ($name === 'supporter_profile_91') {
                die('we are here');
                //also tried error_log(); nothing!
        }
}

```

Its written in `wp-content/plugins/files/civicrm/custom-PHP/civicrmHooks.php` and other civihooks/wp functions in that file are firing correctly.

Profile set from `Manage Contribution Pages > [Specific Contribution Page] > Personal Campaigns [tab] > Supporter Profile`

# Answer
> 0 votes
Turns out, this hook is not called when a profile form is submitted on the front-end of the site. The hook is fired during the creation/edit of a profile. Found through a Google search

```
Page Title: hook_civicrm_processProfile - CiviCRM 4.3 Documentation ARCHIVE ...
Page Link: wiki.civicrm.org:8090/confluence/pages/viewpage.action?pageId=86638695

```

Dropped the port 8090 in the SERP link to see the wiki page that says:

> This hook is invoked when processing a submitted CiviCRM profile form (e.g. for "civicrm/profile/create" or "civicrm/profile/edit"). This hook may be used to inject additional markup, scripts, or styles on the profile.

I dont know why that important detail was dropped among other important details. The most recent wiki has no such text.

Edit: added as issue in 2017devdocs.

---
Tags: developer, hooks
---


# Question
Title: Wordpress subscribe.url not using base page
I'm setting up a mailing list in CiviCRM 4.7.14 and the latest Wordpress. In Administer-\>System Settings-\>CMS Database Integration, I have the base page set to /civicrm. Yet when a mailing list subscribe confirmation is sent, the subscribe.url token uses http://mydomain.com/wp-admin/admin.php?page=CiviCRM&q=civicrm/mailing/confirm&reset=1&etc...

By default, the link goes to the standard Wordpress login screen. If I change the URL manually in the browser to use /civicrm instead of /wp-admin/admin.php it processes the subscription. Or if I log in, the admin.php link processes the subscription.

I understand the "base page" stuff has been evolving through recent versions. I did upgrade this CiviCRM install from 4.6.x, so maybe there was a glitch with that. Is there something I can do to correct things? I tried changing the base page to something else, then back to /civicrm to reset things, but it didn't help.

I haven't tested the unsubscribeUrl token, but can do so if it would help with debugging.

Thanks for any thoughts!

# Answer
SOLVED at https://lab.civicrm.org/dev/wordpress/issues/27/

---

Old workarounds:

I tracked down the problem somewhat and opened an issue at the bug tracker. I describe a code change which makes this work...but I don't know whether it's the best solution.

https://issues.civicrm.org/jira/browse/CRM-20053

UPDATE: I couldn't get that old fix to work any more after upgrading to CiviCRM 4.7.21. So I put in an Apache rule in my .htaccess file to redirect:

```
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI}  ^/wp-admin/admin\.php$
RewriteCond %{QUERY_STRING} q=civicrm/mailing/confirm
RewriteRule ^(.*)$ /civicrm [L,R=302]
</IfModule>

```
> 0 votes

---
Tags: wordpress, civimail, subscribe, base-page
---


# Question
Title: What does 'Enable global server wide lock for CiviMail' do?
At Administer \> CiviMail \> CiviMail Component Settings, there is a setting called 'Enable global server wide lock for CiviMail'. What does it do? When it is a good idea for a site to have it and when it is a good idea for a site to have it on?

# Answer
> 4 votes
From the comments in CRM/Core/Lock.php:

```
   * @param bool $serverWideLock
   *   Should this lock be applicable across your entire mysql server.
   *   this is useful if you have multiple sites running on the same
   *   mysql server and you want to limit the number of parallel cron
   *   jobs - CRM-91XX

```

So basically if you are running multiple civicrm instances on one box and want to limit the number of mailing jobs happening across all instances. This was funded by NYSS and was applicable to their installation.

# Answer
> 2 votes
From https://issues.civicrm.org/jira/browse/CRM-9153

For multi-sites with a large number of sites (e.g. NYSS with 80 sites), running on a few servers we might want the number of cronjobs processing a mailing to be limited across ALL sites, not across one specific site. Fortunately MySQL locking mechanism is server-wide and we can reuse this, which also means this will not work on sites with multiple MySQL servers. Briefly, we will:

1. Introduce a global setting that allows the admin to enable server wide locks (false by default)
2. Modify the core locking code, CRM\_Core\_Lock to enable calling functions to specific if server wide locks or site specific locks should be used. Site specific locks are the default
3. Modify the cron script to read this setting and choose the locking mechanism

---
Tags: civimail, settings
---


title: Q: Unable to upgrade past 4.7.13

text:
# Question
Title: Q: Unable to upgrade past 4.7.13
Since 4.7.13 on Wordpress I am unable to upgrade my CiviCRM install. I enclose an image of the error message I get.

Clicking on the *Retry* or the *Skip* buttons has no effect.

I can't see what's going wrong, as I've not had any problems before. I am running WordPress 4.7.2, have no extensions, and cleared the cache and template\_c folder as instructed on this page

https://wiki.civicrm.org/confluence/display/CRMDOC/Upgrading+CiviCRM+for+WordPress

# Answer
> 1 votes
This is due to a Javascript error. You should make sure again that the CiviCRM files are all in the correct place.

Then try to run the upgrade in Firefox with Firebug enabled and look for JS errors in Firebug and that will provide you the clue as to what the problem is.

---
Tags: wordpress, upgrade
---


title: Status override bulk update

text:
# Question
Title: Status override bulk update
Is there anyway of turning off status override for all memberships rather than individually going into each one.

Thanks,

# Answer
If you have access to the civicrm database and, using PHPMyAdmin, find the table "civicrm\_membership" and the column "is\_overide", you could carefully change the relevant values to "NULL". You would be advised to first take a backup of the database in case anything goes wrong.
> 1 votes

# Answer
It sounds like you are wanting to have Memberships auto-renew based on Direct Debit - this could be possible if there is an integration for the Direct Debit

Otherwise there may be a work around such as making Direct Debit memberships a type that is set to Lifetime, and you would then need to pick up on when a Direct Debit payment does not happen and put in an End Date.
> 0 votes

---
Tags: civimember
---


# Question
Title: Has anyone had issues with multiple contact types showing as a result in Search Builder despite contact specification?
I've been using Search Builder to specifically find Journalists with two types of Media Interests, however my results have Talent and Media Outlets that do not have those Media Interests (two contact types I have not chosen).

I'm trying to get only Journalists, not Media OUtlets or Talent members.

Has anyone had a similar issue with multiple contact types showing up?

# Answer
> 0 votes
It seems like your custom field does not already enforce getting your desired contact type since other contact types have this field populated as well.

You can add a search field for contact type or contact subtype to limit your results to your desired type of contact.

# Answer
> 0 votes
Rebekah - from the list you posted MOST of them show both the categories selected. The only ones (7th one down) that I can see that don't have them have a lot of others and may simply be pushing the ones you want to see out of sight.

Perhaps I don't understand your question but from what I see the result looks mostly right.

AH - If you are wanting to find records that ONLY have those two categories then I suspect Search Builder may not be able to do that in one step.

You may need to create a group of those above, and then create Groups for each of the categories you don't want to find, and use the Include/Exclude Custom Search.

Or do this via an sql query

---
Tags: contacts
---


# Question
Title: Can a CiviCRM member upload post content to a cutstom post type in Wordpress?
In short, can a person register on CiviCRM, and then be given permission to post content for review (such as an upcoming event or job opportunity), which can then be moderated and approved by an admin?

We are considering CiviCRM for our organisation and think this is possible, but want to make sure.

# Answer
Users are managed by WordPress and you can give specific roles permissions to access components in CiviCRM. Content management is handled by WordPress. I am not sure of all the details but it sound like you will need to manage permissions in both CiviCRM & WordPress for specific roles.

Take a look at this post. It has info on a similar scenario with some info on plugins that might help. Including Member Login to a CiviCRM Site

Hope this helps...
> 1 votes

# Answer
I'll outline how this can be done (with no additional code) with Drupal. Someone with more Wordpress knowledge can translate - or identify the gaps in the Wordpress integration:

The Drupal way:

* send a user to a CiviCRM profile page -\> the user fills it out; is added to a CiviCRM group and a Drupal account is created in the process;
* Using CiviCRM group-role sync the Drupal account has a specific role; user can log in and add content of eg type submit conference paper (or job post) content is unpublished
* Conference organizers have permissions to view/approve i.e. publish content of type conference paper and permissions to fill out fields for day/time slot
* Drupal Views pulls these abstracts/author/date/timeslots together into various displays for conference programs and full conference proceedings
> 0 votes

---
Tags: wordpress, permissions, user
---


# Question
Title: How to alter the options inside element of a civicrm new membership form?
```
function custom_changes_civicrm_buildForm($formName, &$form) {
if ($formName == 'CRM_Member_Form_Membership'){
  foreach($form->_elements as $key => $value){
    if ($key == 4){
    $assoc_array =  $value->_options[1][67];
      ksort($assoc_array,SORT_NUMERIC);
unset($form->_elements[$key]->_options[1][67]);
     $form->_elements[$key]->_options[1][67] = $assoc_array;
    }
  }

```

I want to alter the options order by using ksort, but I dont find any function to alter the elements like setLabel which sets label

Which is the function for altering and changing options in an element?

# Answer
> 1 votes
I'd do it like this:

1. First get the name of the select element, and then get the elemement using this

`$element =& $form->getElement('name-of-select-element');`

i.e. don't hard code that 4.

2. You've got the options array correct, i.e. $element-\>\_options

Now you can just replace that options like you're doing, but depending on the widget in use it can be confusing how it's structured. The one I was working on recently has option\['text'\] as the label. Sorting by array values can be done manually or cleverly with some php and callback functions if you're ambitious.

---
Tags: quickform
---


# Question
Title: How do i set up registration for multiple workshops?
I am trying to set up registration for an event that has multiple workshops. i need people to pre register and i am uncertain how to set up.

# Answer
> 2 votes
You can setup workshops as price fields within a price set. Setup the field with your choices, make the price $0 & uncheck the 'Display amount' box. They will show up as line items on the registrant's receipt at $0 cost.

Another option is to make them custom fields for participants and add them to a profile.

I find reporting is more is more robust when you use fields in a price set.

Hope this helps.

---
Tags: civievent
---


# Question
Title: What is the best way forward to conduct surveys on an iPad?
I am trying to help my co-operative optimze their workflow.

At the moment:

Surveys are conducted during home visits straight into (a very fiddly) excel spreadsheet. Then when back in the office the employee enters some of the data from the spreadsheet into CiviCRM and the rest is retained in the spreadsheet (mainly because it takes too long to transfer all the data).

Two routes come to mind:

1. Use the Survey functionality to create a form that can be viewed on the ipad - would this then be viewed through a webpage or is there an app available for this?
2. I create my own form or app which can output a CSV file. This could then be uploaded to Civi relatively easy and also easily transferred to Excel/reports.

If anyone can point me in the right direction for how to use CiviCRM more effectively that would be fantastic!

# Answer
> 3 votes
If the iPads are connected to the internet, then you can create a profile form (or Webform if your site uses Drupal) and they can submit it directly.

I'm not aware of an offline app but others may know of one.

# Answer
> 1 votes
I was looking at a similar solution for one of my clients a while back, where they were very likely to be offline. A quick Google search (I think I searched for 'offline forms iOS' or somesuch) revealed that there are plenty of relatively low cost solutions out there that will let you create forms on an iPad and save all the data submissions into a CSV or similar that can then be sucked in to your Civi DB.

---
Tags: ui, civisurvey
---


# Question
Title: "Error while sending QUERY packet. PID=975356 in wp-db.php on line 1877" for new install
I am (trying to be) a new CiviCRM user. I've tried installing both 4.7.16 and 4.6.26 on clean installs of WordPress 4.7.2.

I end up with the following error when installing the plugin.

"Error while sending QUERY packet. PID=975356 in wp-db.php on line 1877"

I can then Activate the plugin, and then I Configure CiviCRM.

"Database version and connection settings have been verified and look correct!" as follows:

CiviCRM Database Details

Does the server exist? OK (localhost) Are the access credentials correct? OK MySQL version at least 5.1 OK (MySQL 5.6.33-log) Is auto\_increment\_increment set to 1 OK Is the provided database name valid? OK Does MySQL thread\_stack meet minimum (192k) OK Can I access/create the database? OK (Database 'jointe6\_wp278' exists) Can I access/create InnoDB tables in the database? OK Can I create temporary tables in the database? OK Can I create lock tables in the database? OK Can I create triggers in the database? OK

Requirements

PHP Configuration

PHP5 installed OK (PHP version 5.5.38) MySQL support OK JSON support OK Memory allocated (PHP config option 'memory\_limit') OK (512M) File permissions

Does the webserver know where files are stored? OK ({location}/wp-admin/) Does the CiviCRM path contain PATH\_SEPARATOR? OK ({location}/wp-admin/) Folder 'CRM' exists? OK Folder 'packages' exists? OK Folder 'templates' exists? OK Folder 'js' exists? OK Folder 'api' exists? OK Folder 'i' exists? OK Folder 'sql' exists? OK Is the {location}/wp-content/uploads/civicrm folder writeable? OK

---

I click Check and Install It reports that it was successfully installed

But the page refreshes and I get the following error:

CiviCRM Home

System Status: Error Cron Not Running Timestamp Mismatch Configure Default Mailbox Complete Setup

---

At this point, anything I try to do only shows "System Status:Error"

Any suggestions?

TIA!

# Answer
Problem solved. There was an installation of WordPress left in the public\_html directory from a prior install. Removing this WP installation allowed the CiviCRM plugin installed in addon domain folders to work properly.
> 3 votes

# Answer
You're reporting two different types of errors, so let's talk about them separately.

> "Error while sending QUERY packet. PID=975356 in wp-db.php on line 1877"

This appears to be specific to your hosting environment - but also it doesn't appear to have affected the install of CiviCRM.

> System Status: Error Cron Not Running Timestamp Mismatch Configure Default Mailbox Complete Setup

These errors are saying, "You have successfully installed CiviCRM, but it's not completely configured yet." If you're getting these errors, you're further along than you think!

Each of those issues has to be handled differently. Note, however, that the vast majority of CiviCRM functionality is available WITHOUT fixing these issues. I wouldn't use CiviCRM in production without fixing those issues, but you can certainly evaluate Civi.

"Cron Not Running" means you have to set up cron. Setting up cron isn't a CiviCRM-specific skill and unfortunately the "standard" way to set up cron requires shell (SSH) access to the server. If you're using shared hosting, there should be a cron setup option in your control panel, but I can't give you specific instructions since there are so many different control panels out there. You can do a search engine lookup for "civicrm cron" to find more details.

"Timestamp mismatch" suggests that either your WordPress timezone isn't correct, or there's a possible configuration issue with your hosting provider. I would check WordPress, then raise the question with your hosting provider.

"Configure Default Mailbox" is necessary if you intend to do CiviMail mass mailings. If not, you can select to hide this error. Here is documentation for mail configuration, you're concerned with "outbound" configuration.
> 1 votes

---
Tags: wordpress, error, installation
---


title: CiviMail Bounce Type - Syntax

text:
# Question
Title: CiviMail Bounce Type - Syntax
I am interested in learning what the Syntax Bounce Type is about. I have 77 of them from a recent email that was sent.

Thanks!

Gary

# Answer
> 3 votes
Ideally this means, that there was an error in the smtp transaction: https://docs.civicrm.org/sysadmin/en/latest/setup/civimail/inbound/

However, this bounce type is also used for all bounces that could not be classified as one of the other types. Your best bet to actually find out what is going on is to look at the bounce reason in the bounce report or, if thats still not helpfull enough, to have a look into the actual mailbox.

---
Tags: civimail
---


title: change email addres with http request

text:
# Question
Title: change email addres with http request
using the rest API, I am able to change 'normal' fields with a single occurence. But I can't figure out what I should do to change the first email addressl.

Civicrm only accepts post requests to do a database change. If I put in the post parameter hash something like

```
{ :contact_type => 'Individual',
:id => 14330,
:job_title => 'workaholic',
'email[0][email]' => 'testaccount@gmail.com',
:entity => 'Contact' }))

```

the corresponding record is changed (job title is changed) and the email address is *added*. But not replaced. Do I miss some required parameter to make this work?

thanks in advance

# Answer
This can best be done through the Email object. Find the collection of Email objects having contact\_id 14330. Take the first object and use its id to change it:

issue a post request with

```
{ :entity=> 'Email',
   :id=> *EMAILID*,
   :email=> 'NEWADDRES@gmail.com',
   :action => 'create'
}

```
> 0 votes

---
Tags: webform-civicrm
---


# Question
Title: Webform-civiCRM equivalent for Wordpress?
I'm new to CiviCRM and I have a colleague who's using it with Drupal and loving the Webform-CiviCRM integration. I myself use Wordpress and would like to be able to stay with Wordpress but I understand that Webform-CiviCRM is Drupal based. We'd be using forms as a way for new users to register with our organization and I'm wondering how we can achieve similar functionality with forms while staying with Wordpress. Please advise. Thanks!

# Answer
> 11 votes
CiviCRM has a built in form builder which are called Profiles. It's not as powerful as Webform integration, but may fit your needs.

If not, the equivalent for WordPress would be Caldera Forms with CiviCRM integration.

# Answer
> 7 votes
The CiviCRM Gravity Forms integration by CiviVIP is looking like a good first step towards full integration with CiviCRM. Currently it has integration with multiple contacts (that can be linked via relationships) and activities. I think event registration and contributions are on the list of features currently being developed. Nathan's presentation at CiviCon was a good demo of the current integration and insight into what is possible for the future.

Would be super awesome if WP / Civi folks would support the project and deploy the integration on their sites and provide feedback to the developers

# Answer
> 6 votes
A new alternative to Gravity Forms is Caldera Forms with CiviCRM integration. Unlike the Gracity Forms integration, development is active and it now far surpasses Gravity Forms integration in functionality.

# Answer
> 4 votes
I'd be more than happy to answer any questions you have regarding the Gravity Forms to CiviCRM integration available at CiviVIP. I apologize that there isn't more documentation readily available. Something we're actively working on. Please feel free to reach out through the chat or by email nate@wapix.co or ask specific questions here.

Right now the functionality allows you to create contact, create relationships between contacts and create activities. We don't have any of the other components integrated yet. (namely events, contributions, cases, etc.) We are getting close with contributions however. That would be the next step in our roadmap.

This is a pretty new solution so I appreciate your patience in checking it out. We launched it at CiviCon 2015.

# Answer
> 3 votes
There are also good projects for WP/Civi integration by christainwach (He gave a good talk / demo at CiviCON in London) on GitHub, here: https://github.com/christianwach. Good luck, Hope it goes well!

# Answer
> 2 votes
Since you are specifically interested in registration forms, I suggest you begin with the basic functionality of CiviEvent. Out of the box CiviCRM can:

* Create a registration form where members of the public can sign up for your event.
* Allows you to include this form in a WP page/post via shortcodes.
* Create complicated pricing structures and allow people to pay online and/or choose to pay later.

---
Tags: wordpress, webform-civicrm
---


# Question
Title: How can I create A Report based on counties?
As part of our initial member sign-up, we ask folks to list the name of the county where they reside. I want to create a report identifying members who live in specific counties. e.g. A grouping of all members who live in the following counties: Audubon, Guthrie & Adair.

I cannot seem to find a way to create a report that allows me to use the category of 'county'. Do I need to create the group first? How do I do that? Any help would be appreciated.

# Answer
> 2 votes
This is a good question! I don't believe there's a report that lets you filter by county "out of the box". Instead, you can create a smart group, then filter by that:

* Go to **Search menu » Search Builder**.
* Build a search using the criteria as I've outlined them in Screenshot 1 below. Note that assuming you're in the US, there's two "Adair" counties, but no good way to know which is which. Look at your search results to make sure you're getting the right one.
* Press "Search".

**Depending on your needs, you might be done!** This may be all you need. If you need to use this as the basis of other searches/reports (e.g. "show donations from residents of these 3 counties"), you'll want a "smart group":

* From search results, select "All records", then select "Group - create smart group" from the "Actions" menu. See screenshot 2 below, though if you're using an older version of CiviCRM than 4.7, it may look slightly different.
* Name your group, press "Save Smart Group".

Now, when doing future searches/reports, you can use the results of the "3 county" search as a "base group" to search/report within.

---
Tags: groups, reports
---


title: change profile default (custom field)

text:
# Question
Title: change profile default (custom field)
I have an application form for students wishing to sign up for an audition. Our student records contain a custom "standing" field to indicate whether they are active (current students), inactive (past students/alumni), or applicants. This field does not appear in the application form, however when the form is submitted the records default to "active." I must have set it up when I created the profile, but can no longer remember or find where to change it. Any help on how I can change the profile to default to "applicant" on this form?

# Answer
> 1 votes
From your description it sounds like a custom field with specific options (either a select field, checkbox or radio button). If you go to Administer\>Custom Data and Screens\>Custom Fields, find the field group and field then click Edit Multiple Choice options. See if the option for "active" is marked as default. Edit the option and uncheck the default option.

Hope this helps.

---
Tags: profile, default-settings
---


# Question
Title: Leaflet map + Drupal Views + 400 CiviCRM contacts data = performance?
We try to pull CiviCRM contacts data incl. multiply custom fields and display on map. There are around 400 contacts to display, yet map page loads a bit slower, than expected (5 to 10 seconds). It has been worse initially even at quite powerful server, but we've got significant improvements using combination of:

* Redis
* nginx ngx\_http\_gzip\_module
* fine-tuned MySQL (via mysqltuner.pl)
* Drupal caching and Views Accelerator module

Any advice on how to make it loads as fast as possible (up to, say 2-3 seconds) please?

Drupal 7x and CiviCRM 4.6x

**UPD** Views query

> SELECT civicrm\_address.geo\_code\_1 AS civicrm\_address\_geo\_code\_1, civicrm\_address.geo\_code\_2 AS civicrm\_address\_geo\_code\_2, civicrm\_contact.organization\_name AS civicrm\_contact\_organization\_name, civicrm\_website.url AS civicrm\_website\_url, civicrm\_value\_society\_chairman\_10.public\_contact\_for\_society\_988 AS civicrm\_value\_society\_chairman\_10\_public\_contact\_for\_society, civicrm\_address.street\_address AS civicrm\_address\_street\_address, civicrm\_contact\_civicrm\_relationship.id AS civicrm\_contact\_civicrm\_relationship\_id, civicrm\_value\_society\_chairman\_10.subs\_rate\_single\__38 AS civicrm\_value\_society\_chairman\_10\_subs\_rate\_single\__38, civicrm\_value\_society\_chairman\_10.meeting\_day\_time\_1\_531 AS civicrm\_value\_society\_chairman\_10\_meeting\_day\_time\_1\_531, civicrm\_value\_society\_chairman\_10.meeting\_day\_time\_2\_532 AS civicrm\_value\_society\_chairman\_10\_meeting\_day\_time\_2\_532, civicrm\_contact.id AS id FROM {civicrm\_contact} civicrm\_contact INNER JOIN {civicrm\_relationship} civicrm\_relationship\_civicrm\_contact ON civicrm\_contact.id = civicrm\_relationship\_civicrm\_contact.contact\_id\_a AND (civicrm\_relationship\_civicrm\_contact.relationship\_type\_id = '59' AND civicrm\_relationship\_civicrm\_contact.is\_active = '1') LEFT JOIN {civicrm\_relationship} civicrm\_relationship ON civicrm\_contact.id = civicrm\_relationship.contact\_id\_a INNER JOIN {civicrm\_contact} civicrm\_contact\_civicrm\_relationship ON civicrm\_relationship.contact\_id\_b = civicrm\_contact\_civicrm\_relationship.id LEFT JOIN {civicrm\_address} civicrm\_address ON civicrm\_contact.id = civicrm\_address.contact\_id LEFT JOIN {civicrm\_website} civicrm\_website ON civicrm\_contact.id = civicrm\_website.contact\_id LEFT JOIN {civicrm\_value\_society\_chairman\_10} civicrm\_value\_society\_chairman\_10 ON civicrm\_contact.id = civicrm\_value\_society\_chairman\_10.entity\_id WHERE (( (civicrm\_address.geo\_code\_1 IS NOT NULL ) AND (civicrm\_address.geo\_code\_2 IS NOT NULL ) AND (civicrm\_contact.contact\_type IN ('Organization')) AND (civicrm\_contact.contact\_sub\_type IN ('Society')) )) LIMIT 1000 OFFSET 0

# Answer
We think the answer is that the performance issues are (very likely) in the custom code/tpls - that get invoked as well. We've determined that the Views query itself was not the issue.

https://stackoverflow.com/questions/535020/tracking-the-script-execution-time-in-php
> 0 votes

---
Tags: drupal, drupal-views, geocoding, performance, jquery
---


title: Administration menu

text:
# Question
Title: Administration menu
I would like to ask where I can find the "Administer" so that I can enable some features in our system. We are now using Version 4.4.2. I searched everywhere on our home/front page and couldn't find it. We don't see any administration menu as well.

# Answer
> 1 votes
It's to the right of the Reports menu and to the left of Support but I'm guessing the user you are using to access civicrm does not have the administer role so it doesn't show up.

There are couple of ways for permissions to be set up. Mostly it done at the CMS level, which, will be different depending on if you are using Drupal, Joomla! or WordPress.

The online docs go over this for the different CMS's.

https://docs.civicrm.org/user/en/4.6/initial-set-up/permissions-and-access-control/

(This doc is for a later version than you are running but I'm pretty sure it's mostly the same.)

---
Tags: administer
---


# Question
Title: How to remove contact from group using CiviCRM Entity and Drupal Rules
It seems like it should be possible to use Civicrm Entity and Rules to remove a contact from a group, but I don't know how to fetch and change the status of the contact in the CiviCRM Group. The best I've managed is setting the "is\_active" flag on the group, which isn't helpful.

I've seen this question: How can I use Drupal Rules to remove a contact from a group, and I realise doing this is possible using the CiviRules extension, but it is not working (probably because I have civirules 1.3 and can't upgrade because the server runs PHP5.3).

# Answer
Just added a rules action "Unassign contact from group" to the dev release of CiviCRM 2 days ago, along with "Assign contact to group"

This will be in beta7 when it gets released in a couple of weeks, after some new PRs get tested and merged in.

If you have the user object you can use the "Load or Create CiviCRM Contact" action, then use the "Assign Contact to Group" action, to assign the contact one or more groups

This issue had some basic instructions: https://www.drupal.org/node/2854256

Get the dev version here: https://www.drupal.org/project/civicrm\_entity/releases/7.x-2.x-dev

or beta7 or above when it comes out...
> 2 votes

---
Tags: civicrm-entity, civirules, rules
---


# Question
Title: How can I use Drupal Rules to remove a contact from a group
Webform\_CiviCRM integration enables me to add contacts who submit a form to a Civi group. What I'd like to do is to remove them from another group at the same time, as part of a pipeline process. Drupal Rules module offers 'Remove contact from CiviCRM group' as an action, but I can't work out how to "select data of the type Contact" which seems to be what Rules is looking for in order to enable this action. How can I create a rule that removes a contact form a group based on the matched Drupal user submitting a webform (or perhaps based on the fact that the webform adds the contact to a group)?

# Answer
Graham, you can do this with CiviRules? Trigger should be when contact is added to group, condition specifies what group and the related action is to remove contact from group.
> 4 votes

# Answer
Graham made a feature request and we got this feature in the CiviCRM Entity module, for doing this with Drupal Rules

Just added a rules action "Unassign contact from group" to the dev release of CiviCRM 2 days ago, along with "Assign contact to group"

This will be in beta7 when it gets released in a couple of weeks, after some new PRs get tested and merged in.

If you have the user object available in the Rule you can use the "Load or Create CiviCRM Contact" action, then the "Unassign Contact from Group" action to remove the contact from a group.

This issue had some basic instructions: https://www.drupal.org/node/2854256

Get the dev version here: https://www.drupal.org/project/civicrm\_entity/releases/7.x-2.x-dev

or beta7 or above when it comes out...
> 3 votes

---
Tags: webform-civicrm, groups, drupal-rules
---


# Question
Title: 500 error when creating action in rule ''Create linked drupal user account''
I am trying to create a rule based on the blog post here: https://civicrm.org/blog/petednz/creating-drupal-users-made-easy-for-single-or-multiple-contacts-via-civi-imports-and

I'm recreating the rule manually but when I try to create the action 'Create linked drupal user account' I get this error, does anyone know why?

> 2016/11/07 15:09:43 \[error\] 28899#28899: \*113846 FastCGI sent in stderr: "PHP message: PHP Fatal error: Unsupported operand types in /var/www/xxxxxx/includes/form.inc on line 2760" while reading response header from upstream, client: x.x.x.x, server: example.com, request: "POST /system/ajax HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "example.com", referrer: "https://example.com/admin/config/workflow/rules/reaction/manage/rules\_entity\_tag\_create\_drupal\_user/add/1/action"

# Answer
> 1 votes
We got this working using this rule:

```
{ "rules_friends_tag_account_create" : {
"LABEL" : "Self Create User Account and login",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"TAGS" : [ "CiviCRM", "CiviCRM User" ],
"REQUIRES" : [ "rules", "civicrm" ],
"ON" : { "civicrm_entity_tag_create" : [] },
"IF" : [ { "data_is" : { "data" : [ "civicrm-entity-tag:tag-id" ], "value" : "163" } }
],
"DO" : [ { "civicrm_entity_action_load_create_user" : {
"USING" : {
"civicrm_contact" : [ "civicrm-entity-tag:entity-id-contact" ],
"is_active" : "1",
"notify" : "1"
},
"PROVIDE" : { "civicrm_user" : { "civicrm_user" : "Created or Loaded Drupal User" } }
}
}
]
}
}

```

# Answer
> 0 votes
There's been some updated to the Create or Load Drupal User action in CiviCRM Entity beta6, that has improved handling of user creation. Grab beta6 or higher to get the improvement.

If there are continued problems, make a support request / bug issue in the module issue queue on D.O and we'll figure it out

---
Tags: drupal, user-account, drupal-rules
---


# Question
Title: Is it possible to integrate a custom Drupal donate form with CiviCRM?
I'd like to build a custom Drupal form (not using webform) to use as a contribution form and want to know if it is possible to integrate it with CiviCRM. I am not very familiar with Civi's Api capability, so want to ask to make sure it is doable before I jump in... Do you know of an existing example of such a form?

# Answer
So this is definitely possible. I'm assuming that you asking the question, you have some Drupal FAPI experience.

If you have CiviCRM installed already check out the API explorer, and check out the Contribution entity, transact action

Documentation of this API is spotty to non-existent, but its powerful, and works.

There is actually a sophisticated example of using this API call for Event Registrations in the CiviCRM Entity project, CiviCRM Entity Price Field submodule https://www.drupal.org/project/civicrm\_entity

The code there is a little complex, and your requirements may be simpler, but come into the civicrm entity channel on CiviCRM's Mattermost chat at https://chat.civicrm.org and ping @jackrabbithanna and I can help you get started.
> 5 votes

# Answer
I think your question has CiviCRM Entity written all over it! You can create displays - do display suite layouts.
> 2 votes

---
Tags: drupal, api, forms
---


# Question
Title: No run_time timestamp in civicrm_job_log
Currently, my civicrm\_job\_log is the largest table in our database. There was a post Can I safely trim civicrm\_job\_log and civicrm\_log? that mentioned an extension that would keep this table trimmed based on an age. However, in my civicrm\_job\_log all the run\_time timestamps are NULL. How can I get these recorded correctly so that I can keep this log trimmed? fwiw, the timestamps in civicrm\_log, noting changes to the database, are filled in correctly \[this is also a rather bloated table that I would like to trim\]. So, two questions \[sorry\]

1. How do I get non-NULL run\_times in my job log table?
2. How can I best manage civicrm\_log and civicrm\_job\_log?

# Answer
> 1 votes
Funny thing, while the Date column is filled out with a value in CiviCRM 4.6, it is empty in CiviCRM 4.7. I have checked on my customer's instances and the run\_time column is in fact present but empty on 4.7. I will file a JIRA issue on this topic.

If your main concern is cleaning-up this table, you can easily do this by only keeping the last 1,000 or so entries in this table. This is easily done as the civicrm\_job\_log table, like many CiviCRM table, as an id column that is auto-increment. So you would do this to keep that last 1,000 entries:

`-- from http://stackoverflow.com/questions/578867/sql-query-delete-all-records-from-the-table-except-latest-n/8303440#8303440
DELETE FROM`civicrm\_job\_log`WHERE id <= (
 SELECT id
 FROM (
 SELECT id
 FROM`civicrm\_job\_log`ORDER BY id DESC
 LIMIT 1 OFFSET 1000 -- keep this many records
 ) foo
 );`

---
Tags: mysql, logs, scheduled-job
---


# Question
Title: Why does setting "CVV required for backoffice" to 'NO' also unrequire it on front facing forms
I just ran in to this issue on a site - namely setting "CVV required for backoffice" to 'no' results in it CVV fields showing as 'not required' site wide, ie on all public facing contribution pages.

I found a question about this here https://forum.civicrm.org/index.php?topic=34624.0

If this was the intended and desired outcome then at least the help text and label should be updated.

Noting that on 4.6 this is at civicrm/admin/setting/url?reset=1

At 4.7 it is at civicrm/admin/setting/preferences/contribute?reset=1

What should next step be? Have it perform as described, or describe how it performs?

# Answer
> 1 votes
This is a bug and I have opened a JIRA ticket and will update when something comes of that.

---
Tags: payment-processor, contribution-page
---


title: Integrating Moodle With CiviCRM

text:
# Question
Title: Integrating Moodle With CiviCRM
We currently have a WordPress site. We currently use CiviCRM 4.7.15. We are using Moodle underneath the WP. So, we have http://iafst.com/ as the main containing CiviCRM and http://iafst.com/iafstuniv/ running the Moodle.

We would like to bring the students registering via the Moodle under the umbrella of CiviCRM.

Is there anything anyone is aware of to look at for a Best Practices of doing this? We have CPanel access.

Thanks for all you folks do!

# Answer
> 2 votes
It would appear to me that this question is a duplicate of:

Moodle Integration Sample Sites or the way to do it

and there is a good answer on that page.

---
Tags: wordpress, integration
---


# Question
Title: iATS Scheduled job for recurring payments does not "finish" in the logs. How can I fix this or troubleshoot further?
Using 1.5.3, Civi 4.6.26 on D7. In scheduled jobs, the "iATS Payments Recurring Contributions" job is set to run daily. The logs for this event show a record for "Starting execution of iATS Payments Recurring Contributions" but no record for "Finished execution of iATS Payments Recurring Contributions". No "With Result: Success", etc. This has been happening only since February 10 when we updated CiviCRM from 4.6.19 to CiviCRM 4.6.26. Before that, the logs appear as usual with starting and finishing.

The question I am asking may be related to a question I asked last week at Why does the user not get a "transaction complete" or "success" confirmation message after submitting an online transaction? This question is still unresolved (I followed KarinG's suggestion and turned off the "send PDF with receipt", but still don't know why it isn't working properly). Probably is related.

I am assuming that iATS server is supposed to send something (IPN?) to complete the process in Civi and that either it is failing to send, or we are not receiving or CiviCRM is not interpreting what is received properly.

In any case, just to double-check, what should the url settings be in my iATS payments configuration (I have three different processors enabled: credit card, ACH and POS swipe)? I haven't changed anything recently, other than the update, but I just want to make sure the processor is still properly configured (I can't seem to find any documentation on the urls for the iats payments config).

Thank you in advance, Karin, for any help or insight you can give.

# Answer
> 1 votes
a Couple of thoughts:

* The Site URL is not the issue. Yes it has changed but I've confirmed older URLs have not been deprecated - and are fully functional.
* I just verified on a site/project that Using 1.5.3, Civi 4.6.26 on D7 recurring job starts and finishes successfully - with a standard CiviCRM cron (set job to ON on scheduled jobs page)
* You definitively want no PDF receipts to go out with your Email
receipts. If you are still getting DOMPDF errors - do you have any
other custom functionality that's trying to create/attach a PDF?
* The recurring payments job - sends the tokens to iATSPayments -\> and immediately receives a transaction ID. There is no IPN.
* Try this: go to your Reports -\> Create Reports from Templates -\> and go to iATS Payments Recurring Contributions Report -\> Preview Report -\> do you have any next scheduled contribution dates in the past? If so then let's try trigger them manually:
* Go to your Scheduled jobs and on the right side -\> hit Execute Now. Check the log -\> did it run successfully?
* If not go to this Table: civicrm\_iats\_request\_log and check to see which requests were made; then check the civicrm\_iats\_response\_log for any answers from iATS.

Ok let us know what you find out.

# Answer
> 0 votes
Resolved. As Karin pointed out, the problem is with dompdf. I discovered that there is a setting in "Administration=\>CiviContribute=\>civiContribute Component Settings=\>Enable Tax and Invoicing=\>Automatically email invoice when user purchases online" that NEEDS TO BE OFF in order for the transactions to complete through CivCRM via the iATS Payments Recurring Contributions scheduled job. Otherwise the job starts and never finishes (it also does not send a "success alert" to the user after making a one-time contribution and does not update the "next scheduled date" field in the recurring table.) I had completely overlooked this (probably obvious culprit) when I searched for functionality that tries to create/attach PDFs to transaction emails.

Karin, you may want to test this yourself. Don't know if this conflict exists for 4.7x.

As of now, I believe that this is the only setting that was causing the problems with the job not finishing. I will gradually turn other settings back "on" to further test (right now all my custom scheduled jobs and the settings for sending attached PDFs to receipts are "OFF").

Whew! Working now. Certainly don't need "invoice" functionality at all. Thank you Karin and Allen for all your kind help!

# Answer
> 0 votes
I'm curious about the observation that it only started happening after a Civi upgrade from 4.6.19 to 4.6.26. I notice that 4.6.19 came out just before 1.5.3 and 1.5.3 is still the recommended release for 4.6. In other words, if it was triggered by your civi upgrade, I suspect there is something else more subtle going on, and it's unrelated to iATS.

In any case, that job shouldn't be failing silently -- that suggests a critical error before it even gets started. I'd recommend turning on all your logging, manually triggering the job, and then seeing what comes up in your logs.

---
Tags: scheduled-job, iats
---


# Question
Title: Drupal to Wordpress Migration - Can we keep/recreate our forms?
As our tiny organization only has me as our volunteer web developer (and I am far from an expert) we think it may be prudent to migrate over to Wordpress, where things are a little less technically difficult so others will be able to lend a hand. My only hesitation is that we currently make havy use of Drupal's Webform CiviCRM Integration module. We use it for memberships, for event signups, and to collect payment on both of those items. Does Wordpress have comparable capabilities, or would we be leaving that behind?

# Answer
The answer is no - but having said that we do have one organization that went with a Wordpress main site for content delivery \[example.org\] and a second Drupal/CiviCRM site \[secure.example.org\] - to leverage all that Drupal can do. So the Drupal component on the second site is very small - mostly for webform\_civicrm; views displays. One added benefit is that donors really like going to the 'secure' site.
> 4 votes

---
Tags: wordpress, drupal, webform-civicrm
---


# Question
Title: Clear data from supplemental address on update
When I import cleaned postal data and the supplemental address information has moved to the first line of the address, the supplemental address data does not clear, even if I put a space in the field. This results in addresses with errors that don't CASS the next time. How can I do an import and set that field to NULL?

# Answer
I tried this and was able to get it to null the field. I needed to put null in the field in the cvs. I had to make sure the null did not have any quotes around it. Just the word null between the commas.
> 3 votes

# Answer
Paul-Tahoe's answer works for me but isn't documented! I needed it, too. The word "null" worked both with and without quotes around it in the CSV file. It clears the field (only without the quotes) even if you type it directly into a text field in the UI. (This incidentally seems to imply you can't store the single word 'null' without quotes in a text field, which I'm sure is undocumented.)

Note that 'null' cannot be used in imports for the State-Province or Preferred-Communication-Method fields, for example. I've no workaround for this at present.

Please see my suggestion for improvements to the Import function at this question \> Is there an Import option to allow overwriting fields with null (empty)?
> 2 votes

---
Tags: import, upgrade
---


# Question
Title: Does anyone have experience with migrating a MS Dynamics database to CiviCRM
We are in touch with an organization that is planning a move to CiviCRM. They currently use Microsoft Dynamics and they will want to migrate the data into CiviCRM (I suspect 4.6). Anyone done that before, hints, pitfalls, approaches, experiences they would like to share?

# Answer
We are just at the end of migrating an organisation who were using MS Dynamics. In this case, they were providing us with spreadsheets and we were then sorting out the data clean up and manipulation in order to get the results required in CiviCRM.

We didn't use our more complex tools such as the Drupal Migrate approach that we developed for a number of reasons, but even without that we have for example managed to take the old 'one row for every year of membership' and import it so we have a single row for continuous memberships etc.
> 1 votes

# Answer
I have not done this with MS Dynamics. But I did it from QuickBooks. We exported Excel reports out for Contacts and Donation history. Then we imported them into Civi. I'm sure you can do it that way without to much trouble.

We found the API csv Import Extension very useful for getting our information imported.
> 0 votes

---
Tags: migration
---


# Question
Title: Why do custom fields on Membership not pre-load when a member is renewing
There was a discussion on the forum here \- which suggested that the reason this happened was because Contributions should alway be loading fresh data.

The jury seemed to be out on whether that should be default behaviour for Member fields.

Our scenario is members join up, and use Contact Reference field to assign themselves to a club (and then we build a Relationship from that).

When the member renews we absolutely want this data loading.

My feeling is this should be core behaviour but would be good to canvass opinions on this.

# Answer
> 1 votes
We tried the suggestion to

> hack /srv/www/yfnz/yfnz.fudev.co.nz/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution/Main.php line 33 $removeCustomFieldTypes = array('Contribution', 'Membership'); needs to be changed to be $removeCustomFieldTypes = array('Contribution');

and it did what we needed.

---
Tags: civimember, custom-fields, contribution-page
---


title: Unable to add membership types

text:
# Question
Title: Unable to add membership types
I'm very new to this but I can't seem to find an answer to our problem on any of the help pages.

I am trying to simply add a new membership type. There were three membership types already setup with the initial installation, which I was able to modify to our specifications. But when I try to add a new membership type, I am unable to select anything in for Membership Organization, financial type, or membership type plan (pull-downs). There is nothing there.

Any help would be appreciated. We have 5 membership types and need to be able to add two more to the existing three.

Attaching screen shot here. Thank you.

# Answer
> 1 votes
Normally membership type organization dropdown will be empty. so, please type a space and wait for the search - which will list you all contact in the list

For more reference please read the below documentation

Create new membership type: https://wiki.civicrm.org/confluence/display/CRMDOC21/Membership+Types

Create new organization: https://wiki.civicrm.org/confluence/display/CRMDOC42/Create+New+Organization+Contact

Create new financial type: https://wiki.civicrm.org/confluence/display/CRMDOC/Configure+Financial+Types

Create financial account: https://wiki.civicrm.org/confluence/display/CRMDOC/Configure+Financial+Accounts

These above document should help you in creating new membership type - if you need more help please let me know so i will give a screen shot of all the above

I guess this helps!!!

# Answer
> 1 votes
This could also be a permission issue - make sure you are logged in as an administrator and/or have all the required permissions (including acl if you use it).

# Answer
> 1 votes
Perhaps it's a GUI issue -\> reload the page and check your browser's console to see if you get any Errors.

---
Tags: civimember
---


# Question
Title: Is there an Import option to allow overwriting fields with null (empty)?
I'm trying to do a bulk tidy-up of Address fields in CiviCRM 4.7 by exporting the data, manipulating it in a spreadsheet and re-importing it. This involves moving some values around between postal address fields, requiring some to be blanked. The Import option for Duplicate Matching can only be 'Update'. However, if I include a null value for any field it does not overwrite (blank out) an existing value, resulting in duplication. Only non-null values are considered to be updates.

Example: trying to move "121b Baker Street" from 'Supplementary Address 1' to 'Street Address' using Import/Update results in *both* these fields containing "121b Baker Street".

My problem is a more general case of the question at Uploading null email address which refers only to blanking of email addresses.

Unless I'm missing something, I'd like to propose another option for Duplicate Matching (alongside the current Skip / Update / Fill / No duplicate checking) called '**Edit**'. It would allow the removal of existing values by overwriting with a null string but would otherwise behave in the same way as **Update**.

# Answer
> 1 votes
Although I still think the best solution is to have a new 'Edit' option for Duplicate Matching, Clear data from supplemental address on update provides a sufficient workaround for now. The use of "null" in CSV imports should be documented carefully.

---
Tags: contacts, import
---


# Question
Title: Why am I getting "Invalid currency selection: USD for domain iatspayments.com" on submitting a paid event registration?
Using 1.5.3 CiviCRM 4.6.26 on D7. I get the following error: "Invalid currency selection: USD for domain iatspayments.com" when I submit an event registration.

I believe I have the correct server url in NA for credit card payments: https://iatspayments.com/NetGate/ProcessLinkv2.asmx?WSDL

My event page is configured for USD($)

# Answer
Okay. Fixed. I guess this is pretty simple. Needs the domain prefix "www" in the URL for the "Site URL" (in the Payment Processor Settings) or it won't resolve. Not sure why it throws the odd error description. But, hey, it's working now.
> 1 votes

---
Tags: civievent, contributions, iats
---


# Question
Title: Multiple participant registration not tied to contribution for paid events?
When registering multiple participants for a paid event, only the first participant has a contribution attached to them. Each subsequent participant shows up correctly, but has no attached contribution or any payment information.

Checking the `participant_payment` table, no entry is created for the additional participants.

Is there a way to track payments or the contact who registered them for these additional participants?

Examples from the Civi 4.7 Demo site -

**User with contribution:**

**User without contribution:**

# Answer
After looking at this for a good while, I've discovered that clicking the contact name in the "Registered By" field on the additional registrations will bring up the original registration in a modal.

The way it appears now implies that it would take you to that contact's detail page and not their registration.
> 1 votes

# Answer
If you use a Price Set for your event fees you will see the above results. Additional participants will show $0 Fees Paid in Event Reports.

However, if you use the Regular Fees \> Fee Labels at the bottom of the Event Management \> Fees page--on the registration pages, it will show a radio button with the fee amount. This Fee Amount will show below each Participant Profile when registering multiple participants. I have 1 Fee label created and checked "Default" and it automatically has it as required--it cannot be unchecked in the registration process.
> 1 votes

---
Tags: civievent, civicontribute
---


title: Untagging activities

text:
# Question
Title: Untagging activities
I have a search result of activities tagged with a certain activity-tag.

How do I untag them, without updating each single activity?

CiviCRM version 4.4

# Answer
> 2 votes
I don't have access to a 4.4 system, but I think the solution is the same as in 4.6. You would select the tagged activities in your search, and then choose an action of 'Untag activities (remove tags)' This action will untag all the selected activities in one go.

---
Tags: activities, tags
---


# Question
Title: Code example of how to pro-rate Fixed Calendar Year Membership in CiviCRM
To avoid having members pay full price for a fixed Membership Type Plan? We are using the rollover but need something that kicks in before the complete rollover takes affect.

# Answer
I ended up using the buildAmount hook - (in a custom extension) - very similar to how CiviDiscount works! July 01 is the roll over day. After that we don't need to discount anymore. This is my first pass at it:

```
function membershippro_civicrm_buildAmount($pageType, &$form, &$amounts) {

  //retrieve price set field associated with this priceset
  $priceSetInfo = CRM_CiviDiscount_Utils::getPriceSetsInfo($psid);
  $originalAmounts = $amounts;

  $discountApplied = FALSE;
    foreach ($amounts as $fee_id => &$fee) {
    if (!is_array($fee['options'])) {
      continue;
    }

  foreach ($fee['options'] as $option_id => &$option) {
    $originalLabel = $originalAmounts[$fee_id]['options'][$option_id]['label'];
    $originalAmount = CRM_Utils_Rule::cleanMoney($originalAmounts[$fee_id]['options'][$option_id]['amount']);

    $now = time(); // or your date as well
    $to_date = strtotime("2017-07-01");
    $datediff = $to_date - $now;

    $num_days = floor($datediff / (60 * 60 * 24));

    if ($num_days >= 1) {
      $discountAmount = $originalAmounts[$fee_id]['options'][$option_id]['amount'] * $num_days / 365;
    }

    $amount = $originalAmount - $discountAmount;

    $option['amount'] = $amount;
    $option['discount_applied'] = $discountAmount;

    $recalculateTaxAmount = array();
    if (array_key_exists('tax_amount', $originalAmounts[$fee_id]['options'][$option_id]) &&
      array_key_exists('tax_rate', $originalAmounts[$fee_id]['options'][$option_id])
    ) {
      $recalculateTaxAmount = CRM_Contribute_BAO_Contribution_Utils::calculateTaxAmount($amount, $originalAmounts[$fee_id]['options'][$option_id]['tax_rate']);
        if (!empty($recalculateTaxAmount)) {
          $option['tax_amount'] = round($recalculateTaxAmount['tax_amount'], 2);
        }
      }

        $discountApplied = TRUE;

      }
    }
}

```
> 2 votes

---
Tags: civimember
---


title: What are field options?

text:
# Question
Title: What are field options?
Searching in book.civicrm.org shows result titles without "field options". Also don't see anything for "option groups".

# Answer
I may not quite understand the question. When you create a Field, if you set it to eg Select or Radio, then you get to create, or choose an existing set of field options, eg apple, banana, carrot.

Once created, you can access these to modify them either via the field itself, or via Admin \> System Settings \> Option Groups, or at civicrm/admin/options?reset=1

Documentation: best page i can see in book is this one, search for 'multiple choice options' on that page. Maybe documentation needs to be improved so Search for 'Option Groups' offers this page - something you could offer to do as an active member of this open source community?

GENERAL NOTE: these options belong to the Custom Group, which can then be 'used' in a Profile. You do not create or modify them in the Profile directly. Newcomers to civicrm often find it confusing as 'fields' are used in Profiles, and some aspects of them, eg title, pre-help, can be changed in the profile. But the Fields itself is created/modified via Custom Fields.
> 0 votes

---
Tags: administer
---


title: Geocoding in the UK

text:
# Question
Title: Geocoding in the UK
I'm having problems geocoding our contact database. Essentially, very few of the contacts have associated latitude and longitudes. I have tried using both Google and Yahoo. When I run the cron job, I did manage to get it to geocode three addresses -- this tells me that the API calls are working (in the case of google, the key is valid). However, most contacts remain ungeocoded and now the cronjob reports 0 more addresses were successfully coded. I did notice the following error when saving a contact:

```
Unsupported locale specified to parseStreetAddress: en_GB. Proceeding with en_US locale.

```

I guess its possible the UK is not supported for geocoding yet. But this raises the following questions: 1) Why does coding work for some contacts, but not the majority? 2) What do other UK civicrm users do about this? And, 3) Geocoding in the UK should be as simple as submitting the postcode and storing the returned lat/long.

What can be done about this problem?

# Answer
> 2 votes
UK geocoding works if you don't use address parsing. In the scheduled job parameters set `parse=0` or omit the 'parse' line.

For an explanation of street parsing see the wiki and this blog post

# Answer
> 1 votes
You could also give the OSM Geocoding Extension a shot \- although I don't we are not awarae of anyone using it in the UK so far.

# Answer
> 0 votes
I've had success with the systopia.de extension.

You may need to clean up your data a bit. If it works sometimes and not others it's probably a data quality issue.

---
Tags: geocoding
---


# Question
Title: What are the files and fields in CiviCRM?
An organization I volunteer for is considering this software solution. I need to see the files and fields in those files to see how they match to our current system. A brief description of the purpose of the file would be appreciated also. We have about 70,000 records. I'm a software developer, so detail would be appreciated. A large percentage of our records are imported from a voter file provided by the Secretary of State, so voter info needs to be captured. These would need to be matched to the current file and data replaced.

I'm also interested in

1. match/merge of duplicate records;
2. capabilities of selecting subsets of contact files based on things like member type, zip code, has email address (or not);
3. import and export capabilities;
4. custom fields - how easy to add and maintain?.

No doubt I'll have more questions after I learn more.

# Answer
Sounds like you're new to CiviCRM - Welcome to the community. Here's a link to the CiviCRM data architecture page on the CiviCRM wiki.

You can create multiple custom fields in CiviCRM so you should be able create the fields you need for your existing data. During import you can choose which fields get imported and which CiviCRM field they get mapped to.

For match/merge of duplicate records - see: Deduping and Merging

For capabilities of selecting subsets of contact files based on things like member type, zip code, has email address (or not) - see: Searching and Groups & tags

I've mentioned import already - there there various way to export data, including Exporting Contacts

You should try out the demo(s) or better still, download it and create a sandbox to explore CiviCRM's functionality.
> 6 votes

---
Tags: custom-fields, import, data-model
---


title: Web registration in CiviCRM

text:
# Question
Title: Web registration in CiviCRM
I have a solution for non-profit organizations here in Sweden and looking for a solution regarding registration of members (persons) on the organisation's website.

On the organisations webpage there shall be a registration page connected to CiviCRM. When the new person has filled in their information they shall have a response mail.

I want the following information from the new person.

* First name
* Surname
* Street
* Zip code
* Town
* E-mail

And if I can get the following information I will be glad:

* Mobile phone
* Birth date

Do anybody have a solution for this and in what economic level are we talking about?

# Answer
This is easy to achieve if your website is built using Wordpress, Drupal or Joomla, as CiviCRM integrates with all three of these content management systems.

Having installed CiviCRM (https://wiki.civicrm.org/confluence/display/CRMDOC/Installation+and+Upgrades) setting up a 'profile' (a CiviCRM term for a group of fields) is pretty straightforward - lots of guidance on this in the documentation (https://docs.civicrm.org/user/en/stable/) you can then present this to users as a form on your website for a straightforward sign-up form. I don't think a simple profile form like this allows you to send an acknowledgement email to the user though.

If you are offering a membership CiviCRM has great support for this, with a full-blown membership management component supporting both free and paid-for membership schemes. The membership sign-up mechanism does support sending an acknowledgement email, and you can do much more besides, using the Scheduled Reminder mechanism.

With Drupal as your CMS you can integrate with CiviCRM to enable you to use Drupal's Webform module, giving you more control over forms on your site.

If you are not using one of these content management systems for your website then you would need to integrate using the API.
> 3 votes

---
Tags: webform-civicrm, registration
---


title: How to check if DB table exists?

text:
# Question
Title: How to check if DB table exists?
Is there a built-in way to check to see if a DB table exists via PHP? I'd like to add that to my API call and create the table if necessary.

Thanks!

# Answer
> 3 votes
There is a specific CiviCRM function (but all the ways in the other answers will be just as good :-)):

```
CRM_Core_DAO::checkTableExists($tableName)

```

This function will return TRUE or FALSE.

# Answer
> 2 votes
If you're writing PHP in a CiviCRM extension - you can add a /sql/install.sql file in which you can execute MySQL commands like:

```
CREATE TABLE IF NOT EXISTS

```

# Answer
> 2 votes
CRM\_Queue\_BAO\_QueueItem:: findCreateTable() contains an example of how CiviCRM does this, and the presence of this suggested that no "canned" method might exist already.

```
$checkTableSql = "show tables like 'civicrm_queue_item'";
$foundName = CRM_Core_DAO::singleValueQuery($checkTableSql);
if ($foundName == 'civicrm_queue_item') {
  return TRUE;
}

```

But I was wrong, see ErikH's answer: `CRM_Core_DAO::checkTableExists()`!

# Answer
> 0 votes
If you know the name of the table, you could use MySQL via command line:

Log into MySQL using terminal and then execute a command:

`mysql -u [username] -p`

mysql\> `show tables like "test1";`

If it exists, you will get an output such as:

```
+------------------------+
| Tables_in_test (test1) |
+------------------------+
| test1                  |
+------------------------+
1 row in set (0.00 sec)

```

https://www.electrictoolbox.com/check-if-mysql-table-exists/

---
Tags: api, mysql
---


# Question
Title: HTML & Event Pages: Unspecific IDs and Classes at the top
I'll be referencing the HTML created by Wordpress, CiviCRM, and possibly the Pinboard theme.

I was looking to restyle event pages (only) and began with the page with all events: */civicrm/?page=CiviCRM&q=civicrm/event/ical&reset=1&list=1&html=1*

This page, including individual events, and other public-facing pages created by CiviCRM have little to nothing in ways of identifying the page by unique IDs or descriptive Classes, especially at the very top of the parent hierarchy.

It seems that every page has the same way of identifying CiviCRM's body (For me it's the class page-id-4412), is useful to select every CiviCRM page. As we continue down, we notice there is a general but clear CiviCRM class and ID beyond the initial page's header:

```
<div id="crm-container" class="crm-container crm-public" lang="en" xml:lang="en">

```

There is two problems I am having with this:

1. It has nothing specific to the *type* of CiviCRM page it is. ie. is it a contribution page? Event page? etc.
2. It is well past parent elements in the page that CiviCRM is using. ie. the header: `<header class="entry-header">`

Has anyone found a way to select content using clearly marked IDs or Classes this early in the HTML?

For instance, to change the styling of the header between the Event list page and individual event pages appears to me to be impossible by css alone.

To select, `<header class="entry-header">
<h1 class="entry-title">`

This does fall under the page-id-#### ID and class, but nothing specific to the type of CiviCRM page. There would need to be something more specific in the class like,

```
<body class="crm-individual-event">
<body class="crm-event-list">
<body class="crm-individual-contribution"

```

If you know a workaround, I'd love to hear it.

# Answer
> 2 votes
You can use the `body_class` filter, query CiviCRM's state and then add suitably named classes:

```
add_filter( 'body_class', 'my_civi_add_body_classes' );

/**
 * Add classes to body element if on CiviCRM basepage.
 *
 * @param array $classes The existing body classes
 * @return array $classes The modified body classes
 */
function my_civi_add_body_classes( $classes ) {

    // bail if no CiviCRM
    if ( ! function_exists( 'civi_wp' ) ) {
        return $classes;
    }

    // bail if not on CiviCRM's basepage
    if ( 'basepage' != civi_wp()->civicrm_context_get() ) {
        return $classes;
    }

    // get CiviCRM's arguments
    $args = civi_wp()->get_request_args();

    // bail if we don't have any
    if ( is_null( $args['argString'] ) ) {
        return $classes;
    }

    // check for event
    if ( isset( $args['args'][1] ) AND $args['args'][1] == 'event' ) {
        $classes[] = 'civi-event';
    }

    // check for listing
    if ( isset( $args['args'][2] ) AND $args['args'][2] == 'ical' ) {
        $classes[] = 'civi-event-list';
    }

    // check for info page
    if ( isset( $args['args'][2] ) AND $args['args'][2] == 'info' ) {
        $classes[] = 'civi-event-info';
    }

    // check for registration
    if ( isset( $args['args'][2] ) AND $args['args'][2] == 'registration' ) {
        $classes[] = 'civi-event-registration';
    }

    // ... add further checks ...

    return $classes;

}

```

Amend as per your requirements.

Cheers, Christian

---
Tags: wordpress, css, html
---


# Question
Title: Special Characters are not Managed in CSV Export
In Reports, special characters are displayed correctly.

But when I export a Report to a CSV file, special characters are not displayed

Ex.: Hélène (in the report) becomes HÃ©lÃ¨ne in the CSV file.

Is there any solution ?

(Currently in 4.7.12)

# Answer
> 3 votes
As @Chris Burgess said it depends on the software you're using the CSV with, but i'll leave a preemptive workaround for MS Excel since we do this pretty often.

This happens with Excel because CiviCRM exports the data in UTF-8 encoding and Excel tries to open it using ANSI by default. If you download your CSV, open and new workbook, and import your data into it as follows, the characters will display correctly:

* Save the exported file as a csv
* Open Excel
* Import the data using Data--\>Import External Data--\> Import Data (may vary slightly depending on your version of excel, can be Data--\>Get External Data--\>From Text button)
* Select the file type of "csv" and browse to your file
* In the import wizard change the File\_Origin to "65001 UTF"
* Change the Delimiter to comma Select where to import to and Finish

A bit of an annoying workaround but I hope this is helpful!

# Answer
> 1 votes
I have struggled with the same problem, but Excel on a Mac does not offer precisely that option (65001 UTF) for import. It does offer a UTF-8 import option but that does not work--it just changes the non-ASCII characters to other characters but not the correct ones. I have not found an import option on the Mac that takes in the CiviCRM csv files correctly.

My solution was to get a copy of LibreOffice and that takes in the CiviCRM-produced csv files without a hitch. From LO I can save an xls file that Excel does read correctly.

---
Tags: civireport
---


# Question
Title: How to use CiviCRM for child Sponsorship?
I want to use CiviCRM for child sponsorship like the following: The Idead: Create a charity website for orphans sponsorship that enables the contributor to select a child from a list of orphans then orphan profile will open with a Donate button.

What i have done inside Civicrm is:

* I created a group for orphans.
* I added the orphan children to the group.
* I created a public profile to list all orphans to the portal.
* I created a public profile to create a contributor record.
* I created a contribution page that use the contributor profile to collect contributor info like Name, address and email.
* I created a Sponsor Of relationship.

What i want to know is:

* How to add donate button to a child profile?
* How to create a dynamic relationship between the contributor and the orphan child throw the webform when the contributor clicks the donate button?

# Answer
> 2 votes
I like Graham's solution of using Personal Campaign Pages with one page per child. However, that may not scale well; I don't know how many orphans you're working with.

I like Graham's idea of using Webform-CiviCRM on Drupal (or Caldera Forms integration on WordPress) to handle this. I think creating a Relationship would be the easiest approach if you go this route rather than a soft credit. I'm unsure whether you want to create the connection between the donor and orphan, or the donation and the orphan.

If neither of these options appeal to you, you can use a Contact Reference custom field to help create the relationship. However, if you want this to happen automatically, you would need to write an extension. I recommend using the hook\_civicrm\_post hook.

---
Tags: civicontribute
---


# Question
Title: Removing the contact search on a contribution page
I am making a donation page in wordpress using civicrm (latest version for wordpress). For someone who comes to the page for the first time I would like to give them the option of signing up for a newsletter.

The issue is that at this stage they have not signed up yet so they are not in the database. I have a profile attached to the bottom of the donation page to allow them to put in their details. Another issue with the search bar is it allow you to find anyones email address just by searching for their name which is also not what I want.

I was wondering how to remove this search bar asking to select someone else. I would prefer for it to go to an anonymous form that doesn't let you search for contacts. See picture below of the yellow bar containing the form.

# Answer
> 3 votes
I have a fully working donation page set up in civicrm where:

* there is a Financial Type "Donations" set up in Administer/civicontribute/financial type.
* Financial Type is set up in the relevant Contribution Page as "Donations".
* A Profile is attached to the contribution page that collects information in fields such as first name, last name and email address

The settings in the profile are set to 'Used For' standalone form or directory. 'Search views' are switched off. Advance settings include "Wordpress User account required".

I assume that you have a log in facility set up in the CMS Wordpress and that you have switched on 'Anyone can register' in Wordpress/Settings/General. When a user completes your form, they should then get registered in both Wordpress and CiviCRM.

You may be seeing the Search Bar only because you are personally logged in as Admin. Try looking at the contribution page when not logged in and see what shows.

Hope this helps!

# Answer
> 1 votes
The answer peterb gives is correct. One other possible reason you're seeing this is because the URL you're using has "&cid=0" at the end, which is a special parameter meant to cause the behavior you're seeing. Try removing that parameter if it exists AND accessing the page while not logged in; that should fix you up.

---
Tags: wordpress, civicontribute
---


title: Direct link to a CSV-formatted report

text:
# Question
Title: Direct link to a CSV-formatted report
I'm using CiviCRM as a WordPress plugin. I've created a report with a URL like:

https://example.com/wp-admin/admin.php?page=CiviCRM&q=civicrm/report/instance/123

I can visit that page and click the "Export CSV" button. Now, I want to write a script with the Google Sheets API that loads this CSV and updates a Google Sheet. Therefore, I need a direct link to the CSV-formatted report, so my script can issue an HTTP GET and receive the CSV data.

Is there a URL parameter I can pass, or some other way to directly link to the CSV?

# Answer
> 1 votes
This might be tricky because the export csv button actually runs functions to compile the file and force the download using php header() and content-disposition attachment. See line 224 etc here to look at how it is working: https://github.com/civicrm/civicrm-core/blob/master/CRM/Report/Utils/Report.php.

You could probably write an extension that invokes the functions to generate the csv based on what's going on here. Or perhaps one exists?

---
Tags: civireport, urls
---


# Question
Title: Smart group interaction with "display results as" options in advanced search
I would like to create a smart group of Members by membership status and display that as 'Memberships' via the "Display results as.." field in the Advanced search. I want the Memberships display because it offers easy access to the 'Renew' option for repetitive off-line renewals as well as offering different options for exporting templates.

If I set up the search in Advanced search with "Display results as.." set to Contacts, the results page gives me the option for 'New Smart Group' with no problem. However the same search with the Display results option set to 'Memberships' does not have the option for "New smart group' with the results.

Am I missing something, or is there no way to create a smart group for membership display? CiviCRM 4.6.24, Drupal 7

# Answer
If you first create your smart group with the 'contacts' view (groups are by definition groups of contacts)... you can then search on 'group'=your group and 'display as'='memberships'. In my experience that works for smart groups as well.
> 1 votes

---
Tags: smartgroups, search-results, display
---


title: Adding Teacher Bio to Events

text:
# Question
Title: Adding Teacher Bio to Events
Working on a site that does regular classes with different teachers. The teacher bios are stored as pages in WordPress (could be moved to posts). We are looking for a way drop the bios into the event descriptions so when a new event is setup the bios can be part of the description. The site is in WordPress 4.7 & CiviCRM 4.6.

I have looked at a couple plugins (Insert Pages, Display-Posts) that allow you to drop content into other pages in WordPress but they don't seem to work in the CiviEvent Description field.

Thanks in advance for any ideas.

# Answer
You're not going to be able to inject a WordPress page/post into a CiviCRM event without some custom code.

If your event pages are dropped into WordPress pages/posts via a shortcode, you could add the bios above or below the shortcode. This is the simplest approach, and if you wanted to reposition the bios to be within the "Description", that would be doable with 3-4 lines of jQuery.
> 1 votes

# Answer
Events as a content type make more sense in WP, that way you can keep an Events Archive on the website if wanted too. And use CiviEvent for the Registrations part specifically. Then you can manage content all in WP for teachers and events. Using Event Organiser with this CiviCRM integration plugin is useful to have Event listing in WP and link and manage registration with CiviEvent.
> 0 votes

---
Tags: wordpress, civievent
---


# Question
Title: Edit link in directory results not displaying
I am working on a front end directory. I have created the profile and checked the box to "Include profile edit links in search results? " in the profile settings.

When I go to the directory page (as logged in user) and find my contact the "edit" link is not there in the search results. The account I am logged in as in an Admin account so it is my understanding the "edit" link should be there for all contacts.

I feel like I am missing something simple.

We are running Civi 4.6.25 with WordPress 4.7.2

# Answer
> 1 votes
In the shortcode when adding a Proile to WP Page/Post there is an option for Search/Public Directory, the shortcode would be something like this

`[civicrm component="profile" gid="#" mode="search"]`

Replacing the # with the ID of that profile. That provides a page that starts with a search to then view results.

If you include `force=1` in the shortcode it will show all results and the search needs to be extended to use to them filter results.

`[civicrm component="profile" gid="#" mode="search" force="1"]`

---
Tags: wordpress, profile
---


title: Why am I unable to edit a price set?

text:
# Question
Title: Why am I unable to edit a price set?
For some reason I timeout when I try to edit a price set. I have maybe 30 custom price sets or so (mostly because I have had this problem for awhile, so I have to create a new price set with every new contribution page (if I want to modify the price set in any way, like, for instance, change its expiry date). This happens no matter whether the price set is in use, cloned or created from scratch without any connection to a contribution page or an event registration. I just get a spinning CiviCRM triangle of death. Nothing gets saved.

I am using 4.6.26 on D7.

P.S. I am able to make the changes to the tables. The only change I need to make is to expiration fields. However, I don't see why I shouldn't be able to make those changes from within the regular edit screens in civicrm. Something is definitely wrong somewhere.

P.P.S. I just discovered I cannot edit profiles either. This must mean there is something wrong generally, perhaps the server or permissions. There is a workaround for the profiles which is to use the editor function in the "list view" for the profile. I can click on several of the fields to edit, but not in the general edit screen (accessible by clicking the "edit" link in the far right column). Whatever, maybe someone else has solved this issue?

# Answer
You may have already tried this, but if the window that you do the Edit in is a popup, then instead of clicking Edit to get the popup, right click and open in new Tab. Then there is more of a chance that you will see any errors being generated. May not apply in your case but it can be useful to know.

(Decided the comment i made was worth posting as an Answer.)
> 1 votes

---
Tags: price-sets
---


# Question
Title: Automatically transferring info from Casenote to indivudial client form
How do I automatically populate the individual contact form with information from the case note (civicase)? I'm using Wordpress.

I'm using civicases for our intake sheets and I've chosen that because I want a single computer form to take the information down. I know I can use profiles new individual to populate the client information but I need some information in both the case note and the client form. I'm looking for a way to automatically include the information,which is collected through custom fields into the newly created individual and to do the reverse if the client calls back (i.e that info collected automatically populates into the case note).

any advice?

# Answer
if the process you are using is via New Case, then you get the option to Add New Individual if the contact does not exist.

In that case you can modify the New Individual profile and add additional core or custom fields to that so you can add the info you require to your contact.
> 1 votes

---
Tags: wordpress, contacts, custom-fields, civicase
---


# Question
Title: How do I do a mass email to all volunteers?
I am very new to civi and am needing advice on now to do a mass email to all volunteers. I have the language that is to be used in the body of the email. I will copy and paste this to the "Group" or "Mass" email. Thank you for the help!!

# Answer
welcome to CiviCRM!

How are your volunteers defined in the CRM? I.e.how do you create a volunteer instead of a regular contact?

When you know that, log in, go to search -\> advanced search. It's worth getting familiar with these options. Look to see if volunteer appears under contact type.

If you need more info post back!

John
> 1 votes

---
Tags: civimail
---


# Question
Title: CiviMember Role Sync not Syncing One User
Our Drupal 7.50 website is set up so that users can subscribe through CiviMemberships via a contribute page and then we use CiviMember Role Sync Module to assign them a new Drupal role. This has worked well and thousands have gone through this process. However, we have one user who went through the process of creating a Drupal account and then subscribing (becoming a member) and the sync refuses to sync his accounts. I had to give him the Drupal role manually. Names and email address are the same in his Drupal account and his CiviCRM contact record. The contact record shows his membership and contribution. Any ideas how to troubleshoot or manually sync this one user?

CiviCRM 4.7.15 Drupal 7.50 Commons

Thanks!

# Answer
See if there's a deleted contact with the same deets?.

Also petendz's advice is stellar as ever. Use the api explorer do get uf match on that email if for whatever reason you can't access the MySQL table.
> 1 votes

---
Tags: drupal, civimember, roles
---


# Question
Title: Is it possible to send an registration email confirmation to 2 recipients?
We are working on an event registration and would like to have the option to have the email confirmation sent to more than one email address.

In some cases an assistant will register people and they want the email to go to the person completing the form and the registrant.

Does anyone have a way to do this?

Using CiviCRM 4.6.26 with WordPress.

# Answer
Create an Alphanumeric Text custom data field (call it CC Email) in a set of custom fields used for Participants. Note the name of your set of custom fields.

Add your CC Email field to a Profile. This will allow the registrant to specify a CC email when registering for your event.

Find the table that was created in your database for your custom field set. Assuming your civicrm tables have 'civicrm\_' as a prefix, it will be named something like civicrm\_value\_mycustomfields\_#. This table will have a column for your CC Email field.

*Override the sendMail() function in CRM/Event/BAO/Event.php:*

Find the section of code in the sendMail() function that deals with adding CC and BCC emails:

```
$sendTemplateParams['cc'] = CRM_Utils_Array::value('cc_confirm', $values['event']);
$sendTemplateParams['bcc'] = CRM_Utils_Array::value('bcc_confirm', $values['event']);

```

After this code, query to see if there is value in your custom CC Email field for the current Participant and add/append the CC Email address.

```
$query = 'SELECT my_cc_email_field FROM civicrm_value_mycustomfields_# where entity_id ='.$participantId;
$dao = CRM_Core_DAO::executeQuery($query);
if($dao->fetch()) {
  $ccEmail = $dao->my_cc_email_field;
  if(is_null($sendTemplateParams['cc'])) $sendTemplateParams['cc'] = $ccEmail;
  else $sendTemplateParams['cc'] .= ', '.$ccEmail;
}

```
> 1 votes

# Answer
In the Configuration of the Event - in the Thank you and receipting section you should be able to add cc: recipients
> 0 votes

# Answer
As far as I know, this would be a "no this is not possible unless you are also using Drupal in which case webform\_civicrm could deliver the required"

One work around I can think of, which is pretty manual, is that you

* put the 'assistant's email' custom field in to a new profile
* set that Profile to alert someone when it comes in
* and/or make a smart group of Contacts with a 'not null' field

and them ensure that you send a copy of the receipt to their email
> 0 votes

---
Tags: civievent
---


# Question
Title: Search criteria dropdown choices disappeared
I am using Search Builder to make custom searches. I want to search on a Membership field "Payment Method". After entering the operator = normally a small box appeared with a drop-down of the various options (cash, cheque, Direct Debit, etc.) from which I selected the desired option. This has worked fine for me in the past, however yesterday in my haste I accidentally entered a number in the window before selecting the option. Now I can't get the options back. All that comes up is the erroneous number and several other things I have tried.

How do I get my options back? Seems like a cache issue, but I haven't a clue what to clear. I've tried different browsers on my local machine, but it must be something in CiviCRM.

CiviCRM 4.6.24, Drupal 7

# Answer
This may have been a non-problem. Our developer noted that the particular variable I am concerned about is a custom variable, and it seems that custom variables do not present drop-down menus as do the standard variables. One then has to construct the search using the values defined for the custom variables (which would have to be looked up elsewhere in CiviCRM).
> 1 votes

---
Tags: search-builder
---


# Question
Title: Enable recpatcha on all CiviCRM Contribution pages which does not include profiles
I need to include recaptcha on all donation pages in CiviCRM.

CiviCRM: 4.7.13

Drupal: 7.5.0

I know we can enable the "Include recaptcha" in profile settings. But few donation pages does not have profiles configured and I am bit worried how to add recaptcha for those donation pages.

Any help would be greatly apppreciated.

Thank you

# Answer
You can add a profile that only captures email address. Since that's already captured on a contribution page, it doesn't change what appears, but it lets you add a CAPTCHA.
> 1 votes

---
Tags: profile, contribution-page, recaptcha
---


# Question
Title: CKEditor in WP 4.72 and CiviCRM 4.7.16 strips inline CSS for CiviMAIL
The editor strips the inline CSS when composing the emails but seems to re-append when sent. My Comms users are freaking out that they can't check their work before it goes out.

I recently held off upgrading 4.7.13 because I get crazy bugs every time I update. This happened after I did what I hate doing :)

# Answer
> 1 votes
It appears to be by design.

The stripping of head tags has killed my designed templates and I have had to roll back to 4.7.13 until a solution can be found.

I get a little frustrated with undocumented features creeping into minor updates.

---
Tags: wordpress, ckeditor
---