How to call a multiple submit handler Please provide a code with description and example
$form['#submit'] = array('submit_handler1', 'submit_handler2', ...);
$form['submit_one'] = array( '#type' => 'submit', '#value' => t('Submit One'), '#submit' => array('my_module_form_submit_one'), ); $form['submit_two'] = array( '#type' => 'submit', '#value' => t('Submit Two'), '#submit' => array('my_module_form_submit_two'), );
Thank alot Hemant i will try with these code and let you know its working or not
Similar to @Jaypan's first comment, this worked for me:
$form['#submit'][] = 'my_module_custom_submit_handler';
Comments
<?php$form['#submit'] = array
Contact me to contract me for D7 -> D10/11 migrations.
Or anything really. I'm friendly, and open to work or conversation.
Add n number of submit handlers using below code -
Thank alot Hemant i will try with these code and let you know it
Thank alot Hemant i will try with these code and let you know its working or not
Push to the #submit array
Similar to @Jaypan's first comment, this worked for me: