I'm using drupal_get_form('event_signup_form')
to embed my custom form inside a block. The form is being rendered as intended, but submitting the form triggers nothing.
The form function itself is called event_signup_form($form, &$form_state)
and the submit function is called event_signup_form_submit($form, &$form_state)
but it's not being called.
I am using hook_block_view to show the form:
function event_block_view($delta = '') {
$blocks = array();
if ($delta ...) {
$blocks['content'] = drupal_render(drupal_get_form('event_signup_form'));
}
}
I managed to get this working - here is how (stub):
function hook_block_view($delta = '') {
$blocks['content'] = drupal_render(drupal_get_form('event_signup_form'));
}
function event_signup_form() {
// Register form submit handler, same goes for validation handler
$form['#submit'][] = 'event_signup_form_submit';
return $form;
}
function event_signup_form_submit($form, &$form_state) {
// This is now triggered
}