Since you are passing $entity_id to id in participant params without checking it to be not empty. If $entity_id is empty then new participant will be created else it will be updated. Make sure your id is set before calling to participant api if you want to update the participant
Found the solution, it is a setting that was there all along.
On the CiviCRM configuration page under the Event Registration tab there is a section called Registration options. In here there is a checkbox to "Disable unregistering participants from unselected events" if you check that then as it says contacts will not get unregistered from events.
I understand that there are some issue when moving contact when logged is as Admin. You can also try an extension developed by LCD Services that moves participant from one contact to another.
Md Maidul Islam,
Bit difficult to understand from your question what you want to achieve.
1 - Do you mean to add participant for an event? Then you can use Entity = Participant and Action = Create api
$result = civicrm_api3('Participant', 'create', [
'event_id' => 3,
'contact_id' => 51,
2 - Do you mean to add participant for an event with ...
From the backtrace, you can see that the error is caused by a line in the org.civicrm.multidomaininvoicing extension. I assume this is your extension?
getvalue is only appropriate if you're sure that a value exists; in this case, you made an API call for a value that doesn't exist. If this is a possibility in your scenario, instead use get and search the ...
You can create a block using view.
Below exported view will list all events the logged in user is being registered.(To test you will need to import the views using below code)
$view = new view();
$view->name = 'event_listing';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'civicrm_participant';
$view->human_name = '...
the following did the trick - works in this situation well enough as we only allow registering one participant:
The above grabs the participant ID of the first (and only in our case) participant
You can add Custom Fields specifically to Participant records and you can be more specific than just 'all participants' since the options provided are
Participants (Event Name)
Participants (Event Type)
You're on the right direction, participant notes are intended for this. But as you say, seems there is no way to show this field info on an event report.
Exists an improvement registered on CRM-20236
Include "Note" field of Registration record in event participant reports that would do what you want. If this is important for you and you don't have skills or ...
This is not a right way of adding participant with contribution associated with it. When there is payment associated with Participants than we need to specify line items in create Participant and/or Contribution api. I would suggest to use Order api to achieve your needs as it is straight forward and handles in convenient way for adding payments in CiviCRM.
Yes, Its possible to alter the Columns in some search results of CiviCRM and definitely YES for participant search result.
You can create an extension and implement hook_civicrm_searchColumns hook. You can also find an example how to use the hook in the documentation.
Other alternate would be to create a report with same filters as Participant search but ...
I confirmed that this is caused by having a name badge layout with a spacer field and sorting the participants by name prior to generating name badges. My work-around for now is to instead of using a spacer in the badge layout, to insert an unused blank field, and I can now print alphabetically sorted badges.
You could do it in multiple steps:
search for Event 1 participants then create a group
use advanced search, enter the new group in the group box, and in the events section select Event 2 participants
You could create both of those as smart groups if you want to check progress as registrations come in.
But hopefully someone has a more streamlined method!
Advanced Search, Participant Search And reports only allows you to select 'One of' the selected option i.e it does "Event 1 OR Event 2" on the selected events.
But I guess you want "Event 1 AND Event 2", if so you can use CiviCRM >> Search >> Search Builder to do AND between conditions. See below attached image
Even if the label is different in English and Chinese, the above API with 'status_id' => "Registered", parameter should work fine as it is meant to make the mapping based on name and not label.
Anyway, I think you should be able to use id instead of passing the name of the participant status in the api params. Something like -
$statusOptions = ...
It can be easily done using hooks. Max participant is stored in civicrm_event table, so you need to fetch the value and then compare it with the count of participants registered in this event. All this check should be done after a participant is created. So, you could use post hook for the same. Sample(not tested) code is shown below -
Soft credits, by definition, allow you to credit a contact for a donation made by someone, for example the person who inspired the actual donor to make a donation. Paying for something on behalf of someone else is not considered a soft credit.
That said, the participant list that you access via the Participants hyperlink to the right-hand side of the event ...
Thank you for asking. This should work - and I just double checked and it is working on one of our live projects:
Webform CiviCRM config:
And the CiviCRM config [On-line and Custom Fields are on the Participants entity].
Is it perhaps possible that you've (accidentally) restricted these Custom fields to certain Events only?
You can try adding a profile with your desired fields and then do an advanced search to result the columns according to your profile. Eg.
Navigate to Administer -> Customize Data and Screens -> Profiles. Add a profile with Search Views enabled.
Add your required fields to it.
Navigate to Advanced Search and select this profile as a view of resulting ...
Yes - typically you would activate "register additional participants" to capture the additional names. The participant count being 5 will NOT trigger this. That workflow is preferred when someone is, say, buying a table of 10 for a fundraiser gala but doesn't know who will be attending. And yes - the participant count should be "1" in this case.
The hook hook_civicrm_eventDiscount runs at the right place where you could apply discounts based on the number of people in the booking ... but there is a caution in the documentation: "This hook is outdated - notable, CiviDiscount does not make use of it." Maybe because of that there is no guidance on how to use it.
You probably want to investigate the ...
OK - I have it,
for this I've set up a Scheduled Job that fires off to "attended" participants a few days after the event. I set up a smart group of "participants whos participatory date was after [a month ago]" so i didn't spam older participants, and used the group as an "include" filter.
Set up an event, of the right type, so that it would get fired.