Hi All,

Create Drupal 7 Modal Forms (WITHOUT Ctools) module - popup login form. Do we have any solution? Just use core module of drupal.

Thanks

Comments

VM’s picture

per: https://www.drupal.org/node/644164 please edit the opening post and move it to the 'post installation' forum. Thank you.

Colorbox = https://www.drupal.org/project/colorbox - will provide an overlay for the login and images
Ajax Register = https://www.drupal.org/project/ajax_register - will provide an overlay for logins and registrations

Modal Form = https://www.drupal.org/project/modal_forms - works with Ctools

The above is a sampling of what I located with google. There are likely others.

nevets’s picture

Other than the overlay module, core does not provide a popup solution.

I would use ctools.

Jaypan’s picture

If you know JavaScript (jQuery) at all, you can just create your own modal.

1) Add a click listener to the link that will trigger the popup
2) Insert a div into the end of the dom
3) Set that div to be position fixed, 100% height and width, of some color (black or white)
4) Append another div after that one, inserting your form into that div
5) Set that div to be in the middle of the page.

imclean’s picture

Another alternative, although the modules aren't so well maintained any more:

  • Modal Frame API provides an API to use jQuery UI Dialog, which support forms.
  • Automodal, which requires Modal Frame, makes it easier to add a dialog to any link and specify parameters. Search the issue queue for information on us

age.

comandor’s picture

Dialog оther simple alternative with Jquery . This is a backport of the Drupal 8 but awesome work with Drupal 7.

Fawad Ali’s picture

i want to show a content type in a popup window like article ,basic page or any other and submit the data of that content type without refreshing the page using ajax....

Jaypan’s picture

Here is a tutorial I wrote that shows how to ajaxify any Drupal form. You'll need to include your own code for the popup though. Ctools module has a method of building popups, but I haven't used it, so I can't provide assistance on how to deal with that.

http://www.jaypan.com/tutorial/drupal-7-ajaxify-form-popup

comandor’s picture

Dialog module provides an API for opening and manipulating interactive overlays. Any page can be opened in a dialog by adding an HTML attribute to the link that should trigger the dialog.

Just set class="use-ajax" something like this

<a href="/node/1" class="use-ajax" data-dialog="true">Example Link</a>

Jaypan’s picture

That combined with my tutorial should do the trick.

comandor’s picture

Yes, of course