DV-JF Posted April 13, 2018 Share Posted April 13, 2018 (edited) Hi, is it possible to show the registration form directly instead of having the login form? I want to use the registration Form for a call-to-action section, so I'll need the form to be displayed without having to link to another site. I'll already tried to hook into __execute() but without any success. Many greets. Edited April 13, 2018 by DV-JF Problem solved Link to comment Share on other sites More sharing options...
gebeer Posted April 13, 2018 Share Posted April 13, 2018 The module looks for a GET parameter register. When this is set to 1, it renders the login form. So what you could do is in the temnplate where you render the login form // set GET parameter register to 1 $input->get->register = 1; // render the form $content = $modules->get('LoginRegister')->execute(); I just tried it and it seems to work. 5 Link to comment Share on other sites More sharing options...
flydev Posted April 13, 2018 Share Posted April 13, 2018 you can just put a get variable ?register=1 on the request and it will show the registration form.. 4 Link to comment Share on other sites More sharing options...
gebeer Posted April 13, 2018 Share Posted April 13, 2018 @flydev I was a minute faster there 1 Link to comment Share on other sites More sharing options...
DV-JF Posted April 13, 2018 Author Share Posted April 13, 2018 @gebeer Thank you - I was trying something like this <?php $input->setUrlSegment(1, "register=1");?> But this didn't work :-( Many greets! 1 Link to comment Share on other sites More sharing options...
Marco Ro Posted May 4, 2018 Share Posted May 4, 2018 If I want to show both in the same page, how I can do? I tried to make an array like this $input->get->["register, login"] = 1 But yes I know it's wrong. UPDATE: Ok I have fund the solution in this way: <div> <!-- The Modal --> <?php $loginRegister = $modules->get('LoginRegister'); $out = ''; if(!$config->ajax) { // if not ajax, show markup $out .= ' <div> <!-- The Modal --> <div id="myModal" class="modal"> <!-- Modal content --> <div class="modal-content"> <span class="close">×</span> <div id="LoginRegisterDiv">'; } // call the module LoginRegister $out .= $loginRegister->execute(); // this render the login form if(!$config->ajax){ $out .= '<div>'; } $input->get->register = 1; $out .= $loginRegister->execute(); // this render the register from if(!$config->ajax){ $out .= '<div>'; } if(!$config->ajax) { // if not ajax, show markup $out .= ' </div> </div> </div> </div>'; } $content = $out; // delayed output // or echo $out; // direct output ?> </div> I load the form inside a modale box, for this there are more code. But the focus still is in creating two different separate renderings. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now