* @return void
*/
static function buildQuickForm(&$form) {
+ $prefix = 'soft_credit_';
+ $form->_softCredit['item_count'] = 10;
for ($rowNumber = 1; $rowNumber <= $form->_softCredit['item_count']; $rowNumber++) {
- CRM_Contact_Form_NewContact::buildQuickForm($form, $rowNumber, NULL, TRUE, 'soft_credit_');
+ CRM_Contact_Form_NewContact::buildQuickForm($form, $rowNumber, NULL, FALSE, $prefix);
+ $form->add('text', "{$prefix}contact[{$rowNumber}][amount]");
}
-
+
// If we have a contact for this contribution, pass cid= to the dataUrl to exclude current contact from autocomplete results
if ($form->_contactID) {
$dataUrl = CRM_Utils_System::url('civicrm/ajax/rest',
+--------------------------------------------------------------------+
*}
{* template for adding form elements for soft credit form*}
- <tr id="softCreditID" class="crm-contribution-form-block-soft_credit_to"><td class="label">{$form.soft_credit_to.label}</td>
+
+ {include file="CRM/Contact/Form/NewContact.tpl"}
+{* <tr id="softCreditID" class="crm-contribution-form-block-soft_credit_to"><td class="label">{$form.soft_credit_to.label}</td>
<td {$valueStyle}>
{$form.soft_credit_to.html} {help id="id-soft_credit"}
{if $siteHasPCPs}
{/if}
</td>
</tr>
- {if $siteHasPCPs}{* Credit contribution to PCP. *}
+ {if $siteHasPCPs}
<tr id="pcpID" class="crm-contribution-form-block-pcp_made_through_id">
<td class="label">{$form.pcp_made_through.label}</td>
<td>
</td>
</tr>
{/if}
-
+*}
{literal}
<script type="text/javascript">
var url = "{/literal}{$dataUrl}{literal}";