Main menu

Popup On Load tutorial - Part 1

Published by dnovikov on Wed, 09/25/2013 - 18:36

About a month ago I released a module called "Popup On Load". Its main features are listed at Here I want to satisfy community request at, and write a short instruction of how the module can be configured and used.

Prerequisites and Installation

Prerequisites to module installation are installed Entity API and Libraries modules.

Also you will need to download Colorbox library, if you have not done this yet. After the download put it to sites/all/libraries folder. In my Eclipse it looks like this:


When its done, go to Modules page and just enable Popup On Load.


Adding a First Popup

Before you do anything, make sure you have an appropriate text format. Neither HTML nor images (which in fact are inserted as HTML too) will appear in the popup until you allow that HTML to be inserted into popup body. This issue relates especially to fresh site installations. Check a corresponding format at Configuration -> Content authoring -> Text formats (/admin/config/content/formats).


Finally you are ready to go. Check the Content -> Popup On Loads menu (menu name sounds not pretty enough, but that's what Entity API module does not questions me). Press an appropriate link, and you will see a popup form.


Don't forget to choose right content format, as we have just discussed.


Save the popup. Don't do anything else for the moment, just visit an arbitrary site page. Remember, the popup WILL NOT show if you navigate through admin pages and anywhere else using admin theme. It will be however shown in all other themes, except of the admin one.



For advanced popup configuration with code and/or Rules, based on additional fields, add ones at /admin/structure/popup_onload/manage.


Other basic configuration options, which apply to ALL popup_onload entities, can be found at /admin/config/user-interface/popup_onload.



The most mystifying thing for me is that sometimes I could miss a popup before I actually see it. After this a specific cookie is set, and popup will not show any more until specified number of days expire.


Later I'm going to add a "test mode", which will allow to display popup regardless of that cookie. For the moment the only way to deal with this problem is clearing cookies for the site (not convenient however), or clear individual popup cookie. It is called "popup_onload_time", and contains a timestamp when the last popup has appeared to the user.

Clear that cookie and the popup should appear once more.

Be careful also with Display only at specified paths setting. It acts similar to block paths textarea.


For the moment that's all, hope you enjoy the module! Will tell you more in next two parts!


After I enabling module PopUp OnLoad, I can't found menu Content -> Popup On Loads. There is just Add Content.
Am I missing something at menu Configuration -> Content authoring -> Text formats?

No, you don't miss anything. The menu should appear. But I've seen this bug a little before. I will try to reproduce it and fix.

Oke, thanks before. I'm waiting it soon

I also can't see menu item add pop up on load. I'm using default drupal admin menu.

I will create an issue for this at

it shown if we only user superfish menu. Here is the screenshot

nieko, great, thank you for the info. will continue my checks.

same problem. havnt this link . some workaround for it ?

it isnt there : Check the Content -> Popup On Loads menu

Not showing popup content field and width, height ..etc fields in Add Content > Popup Onload. showing only regular fields Title, Body.

Add shortcut >> /admin/content/popup_onload

Ok now!!!!

did exaxt what you wrote but its dont popup..
and idears?

Make sure you have at least one popup added with clear text/image which are easy to find on the page. Try to clear all browser cookies and update the page.

Добрый день. Не отображается popup по нажатию кнопки.
Делал через Rules:
Событие - Нажатие кнопки.
Условия - Тип сущности: Материал AND Тип материала: нужный тип.
Действия: Display a popup: номер popup-а

В чем может быть проблема?


Дмитрий, этот модуль не умеет подгружать свой Javascript по нажатию кнопки, только при начальной загрузке страницы. Если вы хотите попап по нажатию кнопки, поищите другой модуль. Самое простое - сделать руками через jQuery.dialog, либо посмотреть в сторону модуля Popup и подобных.


Hi, thanks for the great module.
Is it possible to make the pop up available on each page load?

Thanks in advance

I did not try to implement such behavior, but try to set Cookie lifetime to 0 or 1.

set 'Popup cookie lifetime' to 1 'Popup cookie lifetime' as 50

Hi, I need to style the popup box.
The issue is with the close button. I need to place it on the top right corner. and on hover it is hiding.

Adding shortcut worked for me too, I suggest adding this to the instructions, I spent over an hour figuring this out...

How do you trigger the pop-up to load on the page you want?

I created an issue with patch to solve the problem of the missing tab for adding/editing the Popups.

there is also another companion patch that works well with this one ( that fixes the destination you get taken to the wrong place when you click "save".

I appreciate your help...Thanks a ton!

there is massage appear "You do not have any administrative items. "

can you add a form field to the popup? use as a simple newsletter sign up...if so what additional module do you suggest...thanks

I want to check on a few things. First, is this module still current and being worked on? Second, does this popup on load have a feature for using cookies (i.e. load once every month for each user). And third, can the content just be an image, and is it easy to style (remove any padding, etc.).

Hi, I have loaded the popup onload module to my development site in Drupal 7.34. I cannot see the configuration menu for it. I have followed your tutorial but I cannot find its use anywhere in the admin role? can you help please. where should I find it in the developers menu? I have tried Content and add content however it is not available.

Your module is like bullshit. Nothing work..
- Create entity : no menu
- No detection,
- No popup after entity creation ...

Go and make your own, and stop trying to be a bully to someone helping you..While you are it, take a anger management class

Work like a charm, Thank you

The module works, thank you
Having a fair amount of trouble building out a responsive theme for it. Are their any collections of custom theming efforts?

can you please reupload the images (:

This is embarassing. It is already 2017 and the 2014 bug . . . no content/popup menu bug is still a problem? I will have to look above to see how to fix it, but that should not be necessary at this point. You can access the form here, but why isn't this URL on the the MENU from the start?


I want to show webform in Colorbox and show in block where i can configure the pages where i want that block should display, how to do that is we can use this with Views?

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.