$urlPath = 'civicrm/contact/view/participant';
$urlParams = "reset=1&cid={$this->_contactId}&context=participant";
if ($this->_context == 'standalone') {
- CRM_Contact_Form_NewContact::buildQuickForm($this);
+ $this->addEntityRef('contact_id', ts('Contact'), array('create' => TRUE), TRUE);
$urlParams = 'reset=1&context=standalone';
$urlPath = 'civicrm/participant/add';
}
}
$errorMsg = array();
- //check if contact is selected in standalone mode
- if (isset($values['contact_select_id'][1]) && !$values['contact_select_id'][1]) {
- $errorMsg['contact[1]'] = ts('Please select a contact or create new contact');
- }
if (!empty($values['payment_processor_id'])) {
// make sure that credit card number and cvv are valid
$participantStatus = CRM_Event_PseudoConstant::participantStatus();
// set the contact, when contact is selected
- if (!empty($params['contact_select_id'])) {
- $this->_contactId = $params['contact_select_id'][1];
+ if (!empty($params['contact_id'])) {
+ $this->_contactId = $params['contact_id'];
}
if ($this->_priceSetId && $isQuickConfig = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', $this->_priceSetId, 'is_quick_config')) {
$this->_quickConfig = $isQuickConfig;
{if !$participantMode and !$email and $outBound_option != 2 }
{assign var='profileCreateCallback' value=1}
{/if}
- {include file="CRM/Contact/Form/NewContact.tpl"}
+ <tr class="crm-participant-form-contact-id">
+ <td class="label">{$form.contact_id.label}</td>
+ <td>{$form.contact_id.html}</td>
+ </tr>
{/if}
{if $action EQ 2}
{if $additionalParticipants} {* Display others registered by this participant *}