5

I have the login form block in my header. I removed it and in its place to put a 'login' link.

When clicking the link I'd like a popup (iframe or inline content) to show up. When the form is submitted the popup should close and then return and refresh the parent page.

I think the colorbox module is the right module to do this but I think that my request must be a frequently request and maybe there is an easier way to do this?

Thanks

7

I can confirm that the http://drupal.org/project/colorbox module is one of the easiest (and most supported) ways to have a lightbox for the login form.

There is also other benefits like being able to load AJAX content in the lightbox as well using 'colorbox-load'

  • Can you please show me how to do it with colorbox? – chefnelone Jul 6 '11 at 11:50
  • 1
    Don't suppose you have read the README file - there is excellent documentation in there - drupalcode.org/project/colorbox.git/blob_plain/refs/heads/… – wiifm Jul 7 '11 at 5:16
  • I did it. I just included a hard code line: `<a class="colorbox-load" href="/colorbox/form/user_login?destination=user&width=500&height=250">LOGIN</a>. The colobox popup shows up correctly, but with an error message: 'Request unsuccessful: Not Found'. I'm using Drupal 6. – chefnelone Jul 7 '11 at 12:00
  • I don't suppose you have done all the required installation steps, e.g. enable the module, and download the colorbox plugin, and then enable the "Enable Colorbox load" functionality in the configuration for the module? The 6.x README is here drupalcode.org/project/colorbox.git/blob_plain/refs/heads/… – wiifm Jul 8 '11 at 2:13
  • Thats working fine – Dushyant Joshi Sep 1 '14 at 6:55
1

There is nice Ajax Login/Register module, which demo site is here: http://ajax-register.drupalace.ru/

In the demo Ajax Login/Register uses standard Ctools modal theme but you can customize it as you want.

1

You must try the Popups API (Ajax Dialogs) module.

API for building modal ajax dialogs. Its focus is on putting forms inside of ajax popup dialogs. Current example can present pages as popups (of the lightbox type). This is amazingly useful for things like confirmation pages. And the best part is it can be applied retroactively to a page without needing to modify the generating module, and (of course) it degrades gracefully.

  • thanks. Almost done. I installed the module, I set checked: "Scan all pages for popups links" and add the class to the link to the form. Then I get the popup working fine. But I can't get the popup to get close and refresh parent page. Here are the classes for the link that you can use:(I tried them all...) popups , popups-form , popups-form-reload, popups-form-noupdate. – chefnelone Jul 6 '11 at 10:53
0

if people are going to carry on reading this this link appears to be worth a look:

Is loading an OpenID Provider in an iframe a bad idea if the provider and RP are on the same domain?

  • Hello, and welcome on Drupal Answers. May you expand your answer with a summary of what the linked page says? Answers that are merely a link to external sources are not considered answers, on Drupal Answers. – kiamlaluno Oct 21 '12 at 14:40
0

Recommending Modal Forms -- it only depends on CTools, and it's a pretty popular module.

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.