Commit 435f0f72 authored by acrollet's avatar acrollet

Always add submission callback

parent b1cecc70
......@@ -11,7 +11,8 @@ use Drupal\node\Entity\Node;
*/
function bee_webform_form_alter(&$form, FormStateInterface $form_state, $form_id) {
if (isset($form['#webform_id'])) {
foreach ($form['elements'] as $element) {
$webform = \Drupal\webform\Entity\Webform::load($form['#webform_id']);
foreach ($webform->getElementsDecodedAndFlattened() as $element) {
if ($element['#type'] == 'webform_bee_reservation_form') {
$form['actions']['submit']['#submit'][] = 'bee_webform_form_submit';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment