Platinum Partner

CiviCRM drop-down selector for payment_instrument field of form

// Drop-down selector for payment type (credit card, check, etc) - add this to preProcess() function of the controller code
$this->add('select', 'payment_instrument_id', 
                  ts( 'Payment method' ), 
                  array(''=>ts( '- select -' )) + CRM_Contribute_PseudoConstant::paymentInstrument( ),
                  false, array( 'onChange' => "alert('Add an onchange when a selection is made - perhaps using the built-in showHideByValue?');"));

// Show drop-down selector -- add this SMARTY code to the template code
{$form.payment_instrument_selection.html}
{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}