I am new to Drupal. I have a form which adds details of user to my table. I want to display that node in a popup window. How would I do this?
5 Answers
There are a lot of solutions for this kind of stuff. I would do it in the theme layer to have something really light. You can also use the variety of popup modules for this. One simple way to do this, use the Lightbox2 module, checkout this documentation page: http://drupal.org/node/252260
-
Great... I am able to do that. But can I porgrammatically close the modal window?? Suppose if I submit the form, can I close the window???– SrinathAug 8, 2011 at 13:26
-
What form? Is it a node/add form? another Drupal form? or a custom form?– ipwaAug 8, 2011 at 13:38
-
It is a custom form that I have written in Drupal page. If it passes all the validations it should save the data and close the modal window.– SrinathAug 8, 2011 at 13:39
-
you need: <script>window.parent.Lightbox.end();</script> drupal.org/node/438766#comment-2596092– ipwaAug 9, 2011 at 1:29
-
Use the Colorbox Node module:
Gives the user the ability to display ANY page inside a colorbox modal without the header and footer. Those pages include:
This is an apt module for pop up a node.
The best way is actually this module:
http://drupal.org/sandbox/yuriseki/1771028
The only think you need to do is adapting the path and you're done!
-
Ok... I love the Node Overlay option except that it requires you give users permissions on your administration settings... not. cool. Does anyone know if this module will be getting updated? Jun 6, 2013 at 13:59
-
Using colorbox node module to open node content inside the Colorbox.
Download Colorbox and Colorbox_node Module from drupal.org site
You also need to download colorbox library and copy to sites/all/libraries/colorbox
Install both module and enable it from modules list. after You should create link either manually or using views or whatever the way you want. e.g.
<a class="colorbox-node" href="node/123?width=600&height=600">Page1</a>
<a class="colorbox-node" href="node/123" data-href="node/123?width=600&height=600">Page2</a>
<a class="colorbox-node" href="node/123" data-inner-width="600" data-inner-height="600">Page3</a>
You should specify width
and height
of colorbox to fit your content.
Gallery Support
<a class="colorbox-node" href="blogs/my-example?width=600&height=600" rel="gallery">My Example</a>
Also integrate with Views/Context/Panels Support
Node pop-up
Node pop-up module create paths for popup node view without any dependency (only Drupal 7 core functionally used for creation popup window).
https://www.drupal.org/project/npop
HOW TO
- Enable module
- Create link.
- Variant 1: Set data-npop="NODE_NID" (recomended)
- Variant 2: Set href attribute as "ajax/npop/node/[nid]/load/nojs", where [nid] nid of node and set link class "use-ajax".