All Questions

Tagged with
Filter by
Sorted by
Tagged with
1
vote
1answer
38 views

Attachment API File Upload

I'm working on a file upload of an image with a registration form. The file is being passed to PHP correctly, and I can check its properties in the $_FILES variable. I used the API Explorer to get the ...
0
votes
1answer
30 views

How to get a data for a perticular logged in user ( through API)?

I gave an ACL role to users for data segregation. I want to fetch data from database but data must filter i.e. ACL. How to get data. Also I want a userkey and sitekey?
1
vote
2answers
38 views

API problem regarding to Word Replacement

I want to replace a word. I was trying to insert using API3 but it is not working properly. Word replacement API3 $result = civicrm_api3('WordReplacement', 'create', [ 'find_word' => "...
6
votes
2answers
134 views

Get URL of custom image field

I would like to display pictures which are defined as custom "File" fields within an event. I currently to this by generating URLs having the following format: MY_URL?q=civicrm/file&reset=1&...
1
vote
2answers
139 views

How to use CiviCRM REST API in external PHP code

Been trying to get this to work for hours. Help would be greatly appreciated. userkey and sitekey are replaced with actual keys. I'm trying to run in a php file: $result = curl -X POST "https://www....
0
votes
2answers
56 views

condition on count from chained api call

I am trying to use the api to get all contacts without an address with locationtype billing. For this I use the contact get api, and do a chained address get call. Is there a way to put a condition on ...
0
votes
2answers
157 views

Using Civicrm_api3 in onAjax[Name] plugin function

I created a plugin which provides custom validation for civicrm forms. Part of the jQuery validation on the plugin makes an AJAX call to the plugin. The plugin calls its onAjax[Name] method. In the ...
1
vote
2answers
58 views

How to extract field from an array returned from an API3 call

I am trying to extract a custom field from a contact record. The API returns an array of the following form: Array ( [0] => 0 [1] => 3 [2] => array ( [0] => array ( ...
2
votes
1answer
91 views

Using CiviCRM API in Drupal View

I am trying to use the Civi API within a Drupal view, in the global PHP field. It is all working, except for when I try to use an "Available Variable" from the view, it throws and error. When I hard ...
0
votes
1answer
37 views

Using data from CiviCRM to change filename

Here is what I need to do: The user uploads an image, and I need to change the filename of the image to be firstname_lastname.filtype. The first and lastname are stored within CiviCRM, but the ...
3
votes
1answer
41 views

What are the core functions an extension can rely on?

It's been said, quite reasonably, that all APIs should have tests, and that if a feature doesn't have tests then coders shouldn't rely on it. This raises two three questions: other than direct "API3"...
2
votes
0answers
52 views

Find contacts with multiple relationships of same type

We try to gather total number of users of same Relationship Type but different number of Relationships (mean, user can be a Member of no / 1 / 2 3 .. etc. Organisations). Here's a code we use: $...
3
votes
1answer
88 views

Why does PHP Contribution API not filter on contact_id in 4.6.2?

We recentely upgrade from 4.5.x to 4.6.2 and after that the following API call from PHP does not filter on contact_id and return all contributions for all contacts. $params = array( 'contact_id' =...