5

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?

3

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??? – Srinath Aug 8 '11 at 13:26
  • What form? Is it a node/add form? another Drupal form? or a custom form? – ipwa Aug 8 '11 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. – Srinath Aug 8 '11 at 13:39
  • you need: <script>window.parent.Lightbox.end();</script> drupal.org/node/438766#comment-2596092 – ipwa Aug 9 '11 at 1:29
  • You could also use the forms API to do the form: thedrupalblog.com/… – ipwa Aug 9 '11 at 1:30
2

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.

0

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? – randomblink Jun 6 '13 at 13:59
  • Link returns a 404 - Page not found – leymannx Jun 13 '18 at 10:38
0

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

0

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

  1. Enable module
  2. Create link.
    1. Variant 1: Set data-npop="NODE_NID" (recomended)
    2. Variant 2: Set href attribute as "ajax/npop/node/[nid]/load/nojs", where [nid] nid of node and set link class "use-ajax".

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.