function commerce_reorder_forms in Commerce Reorder 7.2
Implements hook_forms().
To provide distinct form IDs for reorder forms, the order IDs referenced by the form are appended to the base ID, commerce_reorder_reorder. When such a form is built or submitted, this function will return the proper callback function to use for the given form.
File
- ./
commerce_reorder.module, line 251 - Allows users to create a new order from their order history.
Code
function commerce_reorder_forms($form_id, $args) {
$forms = array();
// Construct a valid cart form ID from the arguments.
if (strpos($form_id, 'commerce_reorder_reorder_') === 0) {
$forms[$form_id] = array(
'callback' => 'commerce_reorder_reorder_form',
);
}
return $forms;
}