0

I have form with a link (it open modal):

$form['link'] = [
  '#type' => 'link',
  '#title' => t('Title'),
  '#url' => Url::fromRoute('example_module.event_form'),
  '#attributes' => [
    'class' => ['use-ajax'],
    'data-dialog-type' => 'modal',
    'data-dialog-options' => Json::encode([
      'width' => 700,
      'height' => 350,
    ]),
  ],
];

I need update an element in $form when this modal closes, how can I do that?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.