- Posts: 21
- Thank you received: 0
Add custom javascript to registration page
- Mark McCulligh
- Topic Author
- Offline
- Junior Member
-
Less
More
8 years 11 months ago #80775
by Mark McCulligh
Add custom javascript to registration page was created by Mark McCulligh
I am wondering what is the best way to add custom javascript to the registration page. I want to add some custom business logic that if the correct information is entered I will apply a discount to the plan. My plan is to use the coupon_code input box for this.
Example: If the state/province select(dropdown) is equal to XX add coupon code XXX to the coupon code field then call the calculateSubscriptionFee method to apply it.
Therefore, just wondering that is the best way to add custom javascript to the registration form. Don't really wan to just modify the paymentmethods.js file as I know this will break future upgrades, etc...
Thanks,
Mark.
Example: If the state/province select(dropdown) is equal to XX add coupon code XXX to the coupon code field then call the calculateSubscriptionFee method to apply it.
Therefore, just wondering that is the best way to add custom javascript to the registration form. Don't really wan to just modify the paymentmethods.js file as I know this will break future upgrades, etc...
Thanks,
Mark.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
8 years 11 months ago #80805
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Add custom javascript to registration page
Hi Mark
Not sure what's the best way, to be honest. However, I think you can add the code you want to components/com_osmembership/view/register/tmpl/default.php (that's where the subscription form code located)
Using a template override, it will prevent you from having to worry about it while upgrading to future releases of the extension
Regards,
Tuan
Not sure what's the best way, to be honest. However, I think you can add the code you want to components/com_osmembership/view/register/tmpl/default.php (that's where the subscription form code located)
Using a template override, it will prevent you from having to worry about it while upgrading to future releases of the extension
Regards,
Tuan
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.