You are here

function custom_search_blocks_forms in Custom Search 6

Same name and namespace in other branches
  1. 7 modules/custom_search_blocks/custom_search_blocks.module \custom_search_blocks_forms()

Implementation of hook_forms() to generate a unique form_id with the same form builder function

File

modules/custom_search_blocks/custom_search_blocks.module, line 111
Bring additional search blocks

Code

function custom_search_blocks_forms($form_id, $args) {
  for ($a = 1; $a <= variable_get('custom_search_blocks_number', 1); $a++) {
    $forms['custom_search_blocks_form_' . $a] = array(
      'callback' => 'custom_search_blocks_form',
      'callback arguments' => array(
        $a,
      ),
    );
  }
  return $forms;
}