Override for login form "create an account"

  • David Vinnedge
  • Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 7 months ago #146436 by David Vinnedge
Override for login form "create an account" was created by David Vinnedge
Trying to learn overrides....
I need to override the default login form with either...
First choice- change the "Create Account" link to direct to an Event (I use this event with Registration Integration to create User Accounts)
Second choice- just remove the "Create Account" label & link.

I have copied the default.php file from /modules/mod_login/tmpl  -TO- /templates/mytemplate/html/mod_login
I've tried various edits to either change the link or /* to remove. The first gives me a system error message that the event is not valid.  The second caused my page to Error.
The form link for the Event from menu item is  index.php?option=com_eventbooking&view=register&event_id=6   The alias is "*******-registration"

Then I believe I will need to make the same changes to the Components Login Form.

Please Log in or Create an account to join the conversation.

More
2 years 7 months ago #146445 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Override for login form "create an account"
So exactly what is the problem you are having with the override? Please let me know so that I can understand the actual issue and guide you with solution

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • David Vinnedge
  • Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 7 months ago #146447 by David Vinnedge
Replied by David Vinnedge on topic Override for login form "create an account"
The login form created by the Module Instance-Login Form, has a "Create an Account" link. That link displays the basic Joomla Registration form. I use an Events Booking Event with Registration Integration for registering clients. (It allows me to capture much more information). I would rather have the "Create an Account" link go to that Event Registration, not the basic Joomla registration. I thought I could edit the default.php file in an override to do that. When I view the default.php file, I am just not sure how to edit it. The ways I tried did not work. I hoped you could tell me what code to replace to make that work.
Thanks!

Please Log in or Create an account to join the conversation.

More
2 years 7 months ago #146448 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Override for login form "create an account"
That won't work. The reason is because in Events Booking, there are too many events, so what event you want to link to?

Also, event only accept registration until certain time. After that time, registration is not available anymore. So if you link to that event, users won't be able to register for account

If you want to collect more information from users, you can create custom fields in Joomla. It should works, too, and without needing to create override

Tuan

Please Log in or Create an account to join the conversation.

  • David Vinnedge
  • Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 7 months ago #146564 by David Vinnedge
Replied by David Vinnedge on topic Override for login form "create an account"
The date of the event I want to link to is 12/31/2099, so expiration should not be an issue. It is only an event in the sense that it is a "registration event". It is a way to have families become a member of our organization, then as a Registered User they can access our physical events. I looked at Joomla custom fields, but using Events Booking has more flexibility for what I need.
The only issue is I don't want the base Joomla Registration Form to ever be displayed. So I either need to point the "Create an Account" link (that is connected to the User Login Module Form) to point to my "Registration Event" or not have the link displayed at all.

Please Log in or Create an account to join the conversation.

More
2 years 7 months ago #146574 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Override for login form "create an account"
Hello David

In that case, you can edit code in the file modules/mod_login/tmpl/default.php to change the Registration Link to point to registration form of the event

Once the modification is done and works, you should move the modified file to PATH_TO_TEMPLATE/html/mo_login folder so that the change won't be lost when you update to future releases of Joomla

Regards,

Tuan

Please Log in or Create an account to join the conversation.