Add Two Field into Example Payment Module
Hello Guys,
I am new to drupal & commerce and learning drupal commerce from last month. For my payment purpose I only need to add two extra field into example payment module (e.g. Employee ID, and Join Date). And also show user submitted data into back-end (store -> order -> Payment -> view) to verify.
Payment method
Remote ID
Message -> ( to Name)
Amount
Status
Employee ID,
oin Date
Please help me with code, If you can. Actually I don't know how to write code for drupal.
Thanks for reading.
Comments
Dear Ajai,
I want to add field to Payment (Example payment Module), How I duplicate below code (line #36 of commerce_payment_example.module), to show 3 different field :
// Merge in default values.
$pane_values += array(
'name' => '',
);
$form['name'] = array(
'#type' => 'textfield',
'#title' => t('Name'),
'#description' => t('This is a demonstration field coded to fail validation for single character values.'),
'#default_value' => $pane_values['name'],
'#required' => TRUE,
);
return $form;
}
Please see the image to understand what I want to do:
https://dl.dropboxusercontent.com/u/109058380/Payment.jpg