How can I call a function using drupal_get_form
when a submit button is clicked. My situation is that i have a custom module where there is only a submit button. So when that submit button is clicked I want to call a particular function. How can I achieve it through drupal_get_form
.
Add a comment
|
$form['#submit'][] = 'myform_form_submit';
You can call your function as above. Or
function myform_form_submit($form, &$form_state) {
//execute your function here
}