Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use DrupalCoreFormFormStateInterface;
- use SymfonyComponentHttpFoundationRequest;
- function testmodule_form_node_form_alter(&$form, FormStateInterface $form_state, $form_id) {
- foreach (array_keys($form['tasks']) as $action) {
- if ($action != 'preview' && isset($form['tasks'][$action]['#type']) && $form['tasks'][$action]['#type'] === 'submit') {
- $form['tasks'][$action]['#submit'][] = 'testmodule_form_submit';
- }
- }
- }
- function testmodule_form_submit(array $form, FormStateInterface $form_state){
- drupal_set_message("Why won't this message show?");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement