Show contact form in a pop-up window with Bootstrap classes Can you please tell us how to create a modal window with a contact form, with the bootstrap classes?

I open the form with

&lt;a class="use-ajax" data-dialog-options="{ &amp;quot;width&amp;quot;:633 }" data-dialog-type="modal" href="/node"&gt;Open form&lt;/a&gt;


And why is the modal window not working for anonyms? Thank you!

UPD

Happened!

Connected via theme, at the root of the theme there is a file my-theme.libraries.yml in it, we develop a library 

drupal.dialog.ajax:
  version: VERSION
  js:
    /core/misc/dialog/dialog.ajax.js: {}
  dependencies:
    - core/jquery
    - core/drupal
    - core/drupalSettings
    - core/drupal.ajax
    - core/drupal.dialog


Followed by the root theme in the file my-theme.theme Insert function

function my-theme_preprocess_page(&amp;$variables) {
    $variables['#attached']['library'][] = 'my-theme/drupal.dialog.ajax';
}
Bootstrap and Ajax are two different methods for modal dialogs.

If you want to open a popup with Bootstrap this would be client side. This means you deliver the form embedded in the page as a block and hide it by wrapping it in a Bootstrap modal container:

https://v4-alpha.getbootstrap.com/components/modal/

If you want to load a modal with Drupal Ajax, then use the link you've provided in the question, but target the url of the form, not that of the frontpage:

&lt;a class="use-ajax" data-dialog-type="modal" href="/contact"&gt;Open form&lt;/a&gt;


For this to work you have to attach a js library:

$build['#attached']['library'][] = 'core/drupal.dialog.ajax';



  And why is the modal window not working for anonyms?


It works for logged in users without attaching the library, because core code is doing this already for the admin dialogs.