Questions tagged [modal-dialogs]

Use it for questions about modal popup dialogs, including the overlay implemented in the Drupal 7 Overlay module.

Filter by
Sorted by
Tagged with
2
votes
2answers
1k views

How to close the overlay after form submission

In order to be able to quickly edit Fullcalendar items, I altered the node edit form of the specific content type so the events are saved with AJAX and the page doesn't have to reload. However, I don'...
1
vote
1answer
17 views

How do form #states interact with dialog action buttons, if at all?

A dialog can be fired by a link formatted as such: <a class="use-ajax" data-dialog-options="{&quot;width&quot;:400}" data-dialog-type="modal" href="/some/path"> Some ...
0
votes
0answers
13 views

Adding Custom block types to layout builder side menu

I've created a custom bock type but what to either show it under Add GT Blocks or Start my own menu on the layout builder modal. I've placed this in a module so I would like to add it there. Otherwise ...
1
vote
1answer
96 views

How do I theme the core modal with twig?

Drupal 8 comes with built in modals. This works: <a href="/node/11" class="use-ajax" data-dialog-type ="modal">modal</a> How can I style that modal using twig, to add new classes to the ...
0
votes
0answers
41 views

Programmatically get the current url of the page from where a Webform in a dialog has been loaded

The below link will open the webform (contact) in a dialog: <a href="/form/contact" class="btn btn-success webform-dialog webform-dialog-normal">Contact</a> this same link has been ...
1
vote
1answer
42 views

How to have a dialog box displayed automatically when a page is reached without having to click the link?

Using Dialog API and advice from @leymannx, I added this link to a node (node99): <a class="use-ajax" data-dialog-options="{&quot;width&quot;:600}" data-dialog-type="modal" href="/node/...
2
votes
1answer
390 views

Why does “Cancel People Account” not work?

I have Drupal 7 with Devel installed running over PHP internal server and MySQL. All user operations work correctly except Admin>People>Cancel Account operation. This leads to the overlay Add User ...
0
votes
1answer
390 views

Running JQuery code in Admin Overlay

I have an overlay module installed which allows my admin to open in an Overlay (Jquery Pop Up) I want to run a specific JQuery code whenever admin page opens in an overlay. How can I do that? Thanks....
1
vote
1answer
38 views

How to populate an Entity Reference field from a modal AjaxResponse?

I have an entity ref autocomplete field (reference to bundle A) in one of my bundles (bundle B). I want to add a button below this field which will open a modal for a bundle A create form. This code ...
0
votes
0answers
19 views

OpenModalDialogCommand in form not working

My form code is as follows. I am not able to figure out why the dialog box is not coming. This used to work before. The only change that I did was updated drupal to 8.8.2 version and it stopped ...
1
vote
1answer
48 views

Modal does not handle errors on login

I have used 'use-ajax' class to render login form in a modal. I want to handle validation errors on same modal without closing it. On successful login it is redirecting correctly, but when an error ...
0
votes
1answer
79 views

Creating ajax modal from event

Here's the deal. I want to create a modal popup when an add to cart event is triggered. I've got the event working just fine but can't seem to get the ajax to work properly. What I'm working off of ...
1
vote
1answer
34 views

How to get node title using this query on template?

Im building a custom filter in Drupal 8 based on some queries. I got this already, here im filtering by values on body: $query = db_select('node__body', 'n') ->fields('...
0
votes
1answer
564 views

How to display an overlay image in modal window (Colorbox) upon hover

I have a series of images set up to display in modal lightbox-type windows – specifically, using the Colorbox module. The goal is for each image to be paired with a companion graphic overlay which is ...
0
votes
1answer
103 views

How do I set the Layout builder modal to use the administrative theme?

I'm building a custom Drupal theme and wondering if there is a way to get the modal windows to use the default admin theme. I'm using the Layout builder module with a custom block that uses the Media ...
1
vote
1answer
29 views

Issue regading custom form

https://wineshipinsure.com/newdrupal/ex81/helloform I have been using the custom form and followed all the process for creating the custom form but my form is not working and every time getting page ...
2
votes
1answer
872 views

Modal form file upload is not working

I am trying to use ctools modal form to edit node form. This form is containing a file field. The Form is rendering properly. When I try to upload a file on clicking upload button, file field has been ...
0
votes
1answer
533 views

Is it possible to show only node contents in shadowbox pages?

I'm looking for a method to display content (nodes) in a shadowbox overlay without any blocks or menus around it. even if the user is logged in. Has someone an Idea how to do this are there even ...
0
votes
1answer
555 views

How to trigger a popup window/overlay in my module?

I am stuck in my project. I am working on a module for account management page. When the user update their billing address, a service call will be triggered to send request to a third party API to get ...
0
votes
1answer
30 views

How to open a link in ctools modal by clicking a views row in table format?

I want to open a page in ctools modal. This works for me. <a href="/my-page/nojs" class="ctools-use-modal">Click</a> But now I want to open the same page in ctools modal by clicking the ...
0
votes
0answers
21 views

Dialog modal stops working when updating a block (panel pane, mini-panel, Views. etc) with ajax

I've been using Dialog for a while now, and this is an example of my standard way of requesting a form to be rendered in Dialog popup: $class = array(); $attributes = array(); ...
0
votes
0answers
38 views

SweetAlert doesn't display content markup

The SweetAlert modal is not displaying the content as passed in the option array when returning a response from the controller. Please see the code config below: //$options = ...
1
vote
0answers
22 views

8 - How can I update the entity reference fields of the form when I close the modal?

How can I update the entity reference fields of the form based on selection in the modal dialog when I close the modal ? I have a form and users starts fill the form. Then click on choose address ...
0
votes
0answers
50 views

How to detect a webform when is being loaded in a dialog

Explanation: The below link will open the webform (New Ticket) in a dialog and prepopulate its fields with some data: <a href="/form/new-ticket?uid={{ field_uid }}&nid={{ field_nid }}" class="...
0
votes
0answers
29 views

How to solve Image Thumbnail Field display of Magnific-popup

After a long search, Magnific-popup Drupal 7 found the best matching lightbox option. I created an image, video, audio, and documents file type fields. Everything is smooth with image file where the ...
-1
votes
1answer
45 views

on click popup load another popup and close other popup

I'm having a requirement where I have to show popup on the click link. and then after that pop up open need to show related content on that pop-up. this part is working. by doing this <a class="...
0
votes
1answer
89 views

How to get my button in a dialog click?

I have added the following JS to a node form, it clones the submit button but clicking it inside the dialog (which does show up) doesn't submit the form in the browser, just nothing happens when the ...
0
votes
1answer
75 views

Show rendered node in jQuery modal through JSON

Whenever a link has a specific class I want to show it as a jQuery modal. I have added the neccesarry data attributes to the link in order to be able to use it as a modal. I have also created a route ...
5
votes
0answers
963 views

How do I theme a modal popup?

How can I style Drupal 8 modal window to achieve Instagram style and behaviour? I'm creating modal through extending ControllerBase class, thus have full control of content. However I can't figure it ...
0
votes
1answer
39 views

Create a modal popup

I want to show a modal popup in drupal 7. On searching the web I came to know that it can be done using the ctools module itself. Here is the code I tried: function codeexpertz_menu() { $items['...
1
vote
3answers
619 views

Importing and using overlay from jquery_plugin module

I am trying (and failing) to use the jquery overlay plugin from the jquery_plugin module in Drupal 7. I am using drupal_add_library() to add the plugin and drupal_add_js to add the code to generate ...
1
vote
1answer
229 views

How do I use Bootstrap theme's modal.jquery.ui.bridge's mapped events?

I am using a Bootstrap subtheme, and would like to trigger an event when a modal is closed. Reviewing the main theme's modal.jquery.ui.bridge.js file, I see that the bridge is intending to map jQuery ...
1
vote
1answer
771 views

How to display a form in modal dialog on page load?

This is on Drupal 8.6, PHP 7.2, Theme is based on Bootstrap. The scenario is, I want to display a dialog box with a subscription form in the home page. The dialog box will be loaded automatically ...
0
votes
1answer
28 views

Modal dialog doesn't work

I want to display ctools modal. I tried the following code. /** * Implements hook_menu(). */ function my_module_menu() { $items['my_module/%ctools_js/test-page'] = array( 'title' => 'Demo ...
0
votes
1answer
569 views

How to open a node edit form in an overlay (modal window) in Drupal 8

I have a view with nodes of type 'tasks'. I want to easily view and edit these tasks by using a minimized overlay. When I click on a task title in the view, it needs to open in an overlay. In D7 this ...
0
votes
1answer
280 views

How do I trigger a modal from a template that points to a controller returning an AJAX response

I am trying to trigger a modal from a twig. The path of the modal is a controller that returns an AJAX response as below: Routing code usgbc_myaccount.get_badges_evidence_controller: path: '/account/...
0
votes
1answer
637 views

How do you create a link to a modal dialog?

The following code does not work: <div class="topics"><a class="use-ajax" data-dialog-type="modal" href="/topics-listing">All Topics</a></div> Drupal 8.6.5. Bootstrap ...
0
votes
1answer
233 views

Modal Form Submission

I have a modal form that I added to my module and patterned it after this article. I have used it before with no issues, I was able to use the method to show the form and then save the data. Now ...
2
votes
1answer
858 views

Why are variables & CSS loaded in the overlay?

This seems really weird to me and makes no sense. I'm using a custom theme, with Seven as the administration theme (inside the overlay). Why on earth are variables such as $base_url loaded in the ...
2
votes
0answers
257 views

Why does my chart created with Easychart not display a chart if number of points are more than 1000?

I installed Easychart module 7.x-3.7 in my Drupal 7.51 site. I'm using Highcharts 4.2.7 in libraries 7.x-2.3. In the example contenttype easychart_ex, I tried uploading a data.csv file with number ...
1
vote
0answers
58 views

Open Paragraphs-item into an entityform

I have a profile page with many paragraph sections. I am trying to open the input form for every paragraph separately into a modal form. I don't want to manually build a form for each paragraph. The ...
0
votes
0answers
351 views

How to open video from a video link in an overlay on the same page?

How to open a video from a video link in an overlay on the same page? For example, If you go to google news you would have seen the video attached on the link, open as an OVERLAY, and play on the same ...
2
votes
1answer
2k views

How to view blocks with Text Overlay on hover?

I'm working on a Drupal 7 site and I want to achieve similar thing (view blocks with Text Overlay on hover) shown here. http://ibakatv.com/ under the following blocks (sub sections): Basically I would ...
-1
votes
1answer
249 views

JavaScript for Drupal Edit Overlay

I have written some JavaScript that I want to only run on the Edit page. We are using Drupal 7.8 and in our setup the edit page opens as an overlay. How do I get this javascript to run when the edit ...
0
votes
1answer
295 views

Administration page doesn't show pop-up (overlay) windows

When I try to place new block by clicking "Place block" button or when I click "Configure" on the block I see no pop-up window as I see in tutorial videos, like here: https://www.youtube.com/watch?v=...
1
vote
1answer
100 views

New server runs with https

I have a Drupal site that I am currently developing on a local environment. Recently I uploaded my site to a "live" environment and everything seems to load fine except for all admin functionality. My ...
0
votes
2answers
255 views

Is it possible to show a view's page in the admin overlay?

I created a view with a page display, which has an path alias, say: node/*/something/somethingelse Now I would like that, if someone clicks on a link leading to the above path, the view's page is ...
0
votes
1answer
5k views

How to display a Leaflet map in modal window?

I produce geospatial data in a content type with addressfield and geofield. I can display this data in a Leaflet map as field without any problem. But I have to use here a modal, therefore I render ...
0
votes
2answers
1k views

How to use mmenu without breaking core Overlay

How can I use mmenu jquery library without breaking core Overlay. Overlay works, but when I do a page refresh (F5) the overlay is blank. When I prevent the mmenu library from loading it works again. ...
0
votes
2answers
919 views

Force page open in overlay

I want to force admin pages open only and only in overlay. As you know if a link with an admin path is clicked it opens in overlay (if enabled). But if you write the URL to the browser, or use some ...