The suggested way to pass parameters to a submission handler set as in the code show is to use code similar to the following:
$form['#first_paramater'] = $value;
$form['#submit'][] = 'my_submit_handler';
The handler would retrieve the value as $form['#first_paramater']
.
To notice that, instead of #first_paramater
, the code can use a different string, but it must start with #
.
Normally it's not necessary to set a submission handler like the code does, but there are some cases where it is necessary, like to alter a form created by another module, or to set a different submission handler for each of the submission buttons present in a form.