Questions about Payment Form extension

Email Address and Javascript Cloaking

  • Nathan Morrow
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
10 years 10 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:
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.

More
10 years 10 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 Log in or Create an account to join the conversation.

  • Nathan Morrow
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
10 years 10 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

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

More
10 years 10 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.
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
  • Senior Member
More
10 years 10 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

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

More
10 years 10 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

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

  • Nathan Morrow
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
10 years 8 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

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

More
10 years 8 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

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

Moderators: Tuan Pham Ngoc