We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

How to call username and password fields | Forum

Umair Apr 4 '15
I want to show login username and password fields on join form with forgot password, remember me and login/sign-in button. How I can do it?
Taissa Team
Taissa Apr 8 '15
Topic was moved from General Questions.
Nickolay Apr 10 '15

First look at \ow_system_plugins\base\views\controllers\join_index.html template file.

Simplest way, but not the best, is just to call BASE_CMP_SignIn component like this (in specific place you want sign-in form to appear):

<div id="static-sign-in-form">

            {component class='BASE_CMP_SignIn'}


<script type="text/javascript">

            jQuery('#static-sign-in-form').find('form').attr('action', '{url_for_route for="static_sign_in"}');


The right way, considering you want more control over the form will be to create additional Smarty function file \ow_smarty\plugin\function.signin_form.php containing:



function smarty_function_signin_form( $params, &$smarty )


    $form = BOL_UserService::getInstance()->getSignInForm('sign-in', true);



    $vr = OW_ViewRenderer::getInstance();


    $assignedForms = $vr->getAssignedVar('_owForms_');

    $assignedForms[$params['name']] = $form;


    $vr->assignVar('_owForms_', $assignedForms);


And then insert actual form content into join_index.html and our new function call before:

{signin_form name='sign-in'}

{form name='sign-in'}

<div class="clearfix">

            <div class="ow_sign_in">

                        {block_decorator name='box' langLabel='base+base_sign_in_cap_label'}


                        <div class="ow_user_name">

                                   {input name='identity'}


                        <div class="ow_password">

                                   {input name='password'}


                        <div class="ow_form_options clearfix">

                                   <div class="ow_right">

                                               {submit name='submit' class='ow_positive'}


                                   <p class="ow_remember_me">{input name='remember'}{label name='remember'}</p>

                                   <p class="ow_forgot_pass"><a href="{url_for_route for='base_forgot_password'}">{text key='base+forgot_password_label'}</a></p>






Umair Apr 13 '15
The solution you provided worked perfectly. See the attached file for description of my need. Let me know if it is possible
  Picture3.png (1145Kb)
Nickolay Apr 17 '15
It's possible, you just have to be more specific when describing the topic. I've attached you an example plugin, just install it and style the form according to your needs.

Besides you'll probably want to edit \ow_system_plugins\base\classes\console_event_handler.php file and delete the following:

$cmp = new BASE_CMP_SignIn(true);

$signInMarkup = '<div style="display:none"><div id="base_cmp_floatbox_ajax_signin">' . $cmp->render() . '</div></div>';


$item = new BASE_CMP_ConsoleItem();

$item->setControl($signInMarkup . '<span class="ow_signin_label' . (empty($buttonList) ? '' : ' ow_signin_delimiter') . '">' . $language->text('base', 'sign_in_submit_label') . '</span>' . $iconListMarkup);

$event->addItem($item, 2);



               $('#".$item->getUniqId()."').click(function(){new OW_FloatBox({ \$contents: $('#base_cmp_floatbox_ajax_signin')});});


To remove the original login popup (or just hide it via css).

  cilogin.zip (8Kb)
Umair Apr 17 '15
thanks. I will try it and let you know. I am sorry for not being specific. I realized it later.
Umair Apr 18 '15
hey stranger thanks. I do not have development skills. Finally after fighting with the html file, I managed to get what i wanted. If you remember, previously you helped me with console avatar. You are great. Appreciate your help. See the attachment. I am sure you will be happy to see the result. I would not mind if you say "well done"
  join-mod.png (877Kb)