function payment_test_form_payment_line_item in Payment 7
Implements form build callback: show a payment_line_item element.
1 string reference to 'payment_test_form_payment_line_item'
- payment_test_menu in tests/
payment_test/ payment_test.module - Implements hook_menu().
File
- tests/
payment_test/ payment_test.module, line 101 - Hook implementations and shared functions.
Code
function payment_test_form_payment_line_item(array $form, array &$form_state) {
$form['#submit'] = array(
'payment_test_form_payment_element',
);
$form['line_item'] = array(
'#type' => 'payment_line_item',
'#currency_code' => 'XXX',
'#cardinality' => 2,
);
if (arg(1) == 'default-values') {
$form['line_item']['#default_value'] = payment_test_default_line_items();
}
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
);
return $form;
}