- Posts: 42
- Thank you received: 3
Questions about Payment Form extension
Email Address and Javascript Cloaking
- Nathan Morrow
-
Topic Author
- Offline
- Senior Member
-
Less
More
11 years 8 months ago #33016
by Nathan Morrow
Email Address and Javascript Cloaking was created by Nathan Morrow
Hi Tuan,
I've discovered a bit of a problem with the email address field on the Payments form and Joomla's email cloaking plugin, but only under two circumstances.
1. If a user is logged in to the site and goes to use the payment form, their email address automatically is entered in to the email field, but cloaked with javascript as follows:
I've had to remove the actual script tags to get the post to submit.
I don't have integration with Community Builder or Jomsocial turned on so I'm not sure why the email address has anything in it all, but if it is going to display it would obviously be preferable if it displayed properly.
2. If I've completed the payment form and gone through to the confirmation page, and then click on the Back button, the same thing happens with the email address - it is displayed hidden in javascript. All of the other form information is retained but the email address doesn't display properly.
It would be great if you could have a look at these two issues and let me know if there's an easy fix I can apply.
Thanks
Nathan
I've discovered a bit of a problem with the email address field on the Payments form and Joomla's email cloaking plugin, but only under two circumstances.
1. If a user is logged in to the site and goes to use the payment form, their email address automatically is entered in to the email field, but cloaked with javascript as follows:
Code:
<!-- var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy1075 = 'zaphod' + '@'; addy1075 = addy1075 + 'snaffle' + '.' + 'biz'; document.write('<a ' + path + '\'' + prefix + ':' + addy1075 + '\'>'); document.write(addy1075); document.write('<\/a>'); //-->\n <!-- document.write('<span style=\'display: none;\'>'); //-->This email address is being protected from spambots. You need JavaScript enabled to view it.<!-- document.write('</'); document.write('span>'); //-->
I've had to remove the actual script tags to get the post to submit.
I don't have integration with Community Builder or Jomsocial turned on so I'm not sure why the email address has anything in it all, but if it is going to display it would obviously be preferable if it displayed properly.
2. If I've completed the payment form and gone through to the confirmation page, and then click on the Back button, the same thing happens with the email address - it is displayed hidden in javascript. All of the other form information is retained but the email address doesn't display properly.
It would be great if you could have a look at these two issues and let me know if there's an easy fix I can apply.
Thanks
Nathan
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
11 years 8 months ago #33062
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Email Address and Javascript Cloaking
Dear Nathan
Please see joomdonation.com/55-payment-form/15476-e...ives-code.html#15498 for solution !
Tuan
Please see joomdonation.com/55-payment-form/15476-e...ives-code.html#15498 for solution !
Tuan
Please Log in or Create an account to join the conversation.
- Nathan Morrow
-
Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 42
- Thank you received: 3
11 years 8 months ago #33147
by Nathan Morrow
Replied by Nathan Morrow on topic Re: Email Address and Javascript Cloaking
Thanks Tuan.
Sorry I did search for it on the forums but couldn't find it... was using "Javascript" in my search rather "code".
On a related question, is there any way to disable a logged in users' email address from being filled in automatically?
On the website I am using this extension on they sell a subscription to their online magazines and these are sold to institutions like Universities.
For their accounts, I have setup authentication by IP address, so the University's email address is appearing if someone attempts to use the form while logged in from one of those institutions.
Any ideas?
Thanks
Nathan
Sorry I did search for it on the forums but couldn't find it... was using "Javascript" in my search rather "code".
On a related question, is there any way to disable a logged in users' email address from being filled in automatically?
On the website I am using this extension on they sell a subscription to their online magazines and these are sold to institutions like Universities.
For their accounts, I have setup authentication by IP address, so the University's email address is appearing if someone attempts to use the form while logged in from one of those institutions.
Any ideas?
Thanks
Nathan
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
11 years 8 months ago #33184
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Email Address and Javascript Cloaking
Hi Nathan
Need to edit the code alitle. Open the file components/com_pmform/helper/fields.php, find the code below and remove it. After that, it should work as expected.
Need to edit the code alitle. Open the file components/com_pmform/helper/fields.php, find the code below and remove it. After that, it should work as expected.
Code:
if ($row->name == 'email' && $row->default_values == '') {
$row->default_values = $user->get('email');
}
The following user(s) said Thank You: Nathan Morrow
Please Log in or Create an account to join the conversation.
- Nathan Morrow
-
Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 42
- Thank you received: 3
11 years 8 months ago #33207
by Nathan Morrow
Replied by Nathan Morrow on topic Re: Email Address and Javascript Cloaking
Thanks Tuan, that's worked perfectly.
Cheers
Nathan
Cheers
Nathan
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
11 years 8 months ago #33239
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Email Address and Javascript Cloaking
That's great. Thanks Nathan for confirming. If you have few minutes, maybe you can help me by giving my extension a 5 stars rating and a nice review at
extensions.joomla.org/extensions/e-comme...ing-a-invoices/12458
to support my development.
Regards,
Tuan
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Nathan Morrow
-
Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 42
- Thank you received: 3
11 years 6 months ago #35007
by Nathan Morrow
Replied by Nathan Morrow on topic Re: Email Address and Javascript Cloaking
Hi Tuan,
Review lodged and 5 stars given.
Cheers
Nathan
Review lodged and 5 stars given.
Cheers
Nathan
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
11 years 6 months ago #35048
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Email Address and Javascript Cloaking
Great. Thanks so much Nathan !
Tuan
Tuan
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
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.