1

I want to add an extra field onto the admin login page. I already have the front end login override sorted, just having trouble with the admin side.

I copied file.

administrator/components/com_login/views/login/tmpl/default.php

To

adminitrator/templates/isis/html/com_login/login/default.php

It looks like the override works because, if I echo in the override file. example.

echo '<div>fff</div>';

The fff displays on the login screen on the admin side.

The problem is the fff is generated outside the form part, so it doesn't help adding my field in the above override file.

The form part are created with the following 2 lines.

$loginmodule = LoginModelLogin::getLoginModule('mod_login');
echo JModuleHelper::renderModule($loginmodule, array('style' => 'rounded', 'id' => 'section-box'));

How can I add a field to the login form without changing core joomla files.

Not sure if there is a plugin event for this situation. An plugin event will suite my situation better than an override.

Thanks in advance.

0

The file to override is administrator/modules/mod_login/tmpl/default.php. Note that login forms do not support extending (thus the need for overrides). This means any field you add will not be used for login process. You can still make use of the fields by using a system plugin that runs on login task.

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.