Hi,

I know that it is possible to open the Login and Registration forms in a Shadowbox, but I can't figure out how. (I could use Lightbox2 module, but because I already use Shadowbox, I just want to stick with it for everything I do so as not to accumulate any more heavy JS)

If you know how to have the Login and Register forms to open up in a Shadowbox, please write here. I'm shure many others (especially non-techies) would find it useful for future reference.

Many thanks!

Comments

jnettik’s picture

I know this is an older post but I'm also looking for this if anyone has figured it out.

gratefulsk’s picture

Issue tags: +Fancy Login has this

I am not sure about shadowbox doing this, but Fancy Login has a nice light box viewer at least for the login.

manfer’s picture

Status: Active » Closed (won't fix)

In version 7.x-4.0-beta2 I new shadowbox login module has been added to the shadowbox package that allows to show the login block into shadowbox.

Shadowbox 6 is not opened to new features so other alternatives must be used in that case. At least two have been just mentioned: lightbox 2 and Fancy box.

If someone wants to try to do it programmaticaly themselves with shadowbox the javascript code to open any html into shadowbox would be:


var openShadowbox =  function() {
  // put in this variable the code for the html you want to open in shadowbox
  // if you create this variable from PHP don't forget to use json_encode so the
  // string is valid for javascript
  var theform = "<form action="/anyaction.php"><input type="text" name="username" /></form>";
  Shadowbox.open({
    content: theform,
    player: 'html',
    width: 300,
    height: 400,
  });

<a href="openShadowbox()">Login</a>

So if anyone knows how to provide the forms on that code then he can try to create that feature with shadowbox.