Posted by don_sevcik on August 16, 2012 at 8:32pm
I have a page where I need to render the login form on a click in Fancybox. For the code below, Fancybox works, but the login form does not display nor are the form items anywhere in Firebug.
I've also tried drupal_build_form and drupal_render. When logged in, the page redirects to the user account page.
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery.noConflict();
jQuery("a#log-link").fancybox({
});
});
</script>
<a id="log-link" href="#login-form-f" title="">Log in</a>
<div id="login-form-f" style="display:none;">
<?php drupal_get_form("user_login"); ?>
</div>
Comments
Solved!<?php$elements =
Solved!
<?php
$elements = drupal_get_form("user_login");
$form = drupal_render($elements);
echo $form;
?>
Math Celebrity