Results 1 to 10 of 10
  1. #1
    Join Date
    Jul 2012
    Posts
    99
    Plugin Contributions
    0

    Default Prevent copy paste of email confirmation in Confirm Email Address Entry plugin

    Hi there,
    I've installed the Confirm Email Address Entry plugin which work great. (http://www.zen-cart.com/downloads.ph...do=file&id=107)

    I would like to push it a little bit further since the email address validity is really important for this store purposes (updates and files will periodically be send by email) and I understand the points in all the discussions about the email verification in the account creation, and I agree with them.

    So, I would like to remove the possibility to make a copy paste in the second field of the email confirmation.

    I found way on a php website which is the following:

    First include the jquery file in between the <head> tag.
    Code:
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
    Then add the following code to the <head> tag, below the include script.

    Code:
    <script type="text/javascript">// <![CDATA[
     $(document).ready(function () {
     $('#id_of_textbox').bind('copy paste', function (e) {
     e.preventDefault();
     });
     });
     // ]]>
     </script>
    But, and that's probably a really stupid question, where is the <head> tag?

  2. #2
    Join Date
    Jul 2012
    Posts
    99
    Plugin Contributions
    0

    Default Re: Prevent copy paste of email confirmation in Confirm Email Address Entry plugin

    I placed these codes in html_header.php and changed '#id_of_textbox' by email-address-confirm which is the id if the confirmation text box but it did absolutely nothing. I still can copy the email and post it in the confirmation text box.

    Any idea of an other way I can prevent to paste the confirmation mail?

  3. #3
    Join Date
    Jul 2012
    Posts
    99
    Plugin Contributions
    0

    Default Re: Prevent copy paste of email confirmation in Confirm Email Address Entry plugin

    I also tried by adding
    Code:
     ondragstart="return false" onselectstart="return false"
    on tpl_modules_create_account.php which gave this:
    Code:
    <?php echo zen_draw_input_field('email_address_confirm', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_email_address', '40') . ' id="email-address-confirm"') . (zen_not_null(ENTRY_EMAIL_ADDRESS_CONFIRM) ? '<span class="alert">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>': ''); ?>
    and also in tpl_account_edit_default.php which gave this:
    Code:
    <?php echo zen_draw_input_field('email_address_confirm', $account->fields['customers_email_address'], 'id="email-address-confirm" ondragstart="return false" onselectstart="return false"') . (zen_not_null(ENTRY_EMAIL_ADDRESS_CONFIRM) ? '<span class="alert">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>': ''); ?>
    No result. So I tried many other js code but again, absolutely no result. So please, any help in this will be appreciated guys. I just don't get it.

  4. #4
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,905
    Plugin Contributions
    5

    Default Re: Prevent copy paste of email confirmation in Confirm Email Address Entry plugin

    Take a look in (1.5.1) admin/login.php
    You will find nemerous occurrences of autocomplete="off"
    Viewing this file should give you lots of good ideas

  5. #5
    Join Date
    Jul 2012
    Posts
    99
    Plugin Contributions
    0

    Default Re: Prevent copy paste of email confirmation in Confirm Email Address Entry plugin

    Ok, thanks for that. I will take a look.

  6. #6
    Join Date
    Jul 2012
    Posts
    99
    Plugin Contributions
    0

    Default Re: Prevent copy paste of email confirmation in Confirm Email Address Entry plugin

    No luck... I added this:
    Code:
     onCopy="return false" onDrag="return false" onDrop="return false" onPaste="return false" autocomplete="off"
    In both the email and the email-confirmation text boxes of both files: tpl_account_edit_default.php and tpl_modules_create_account.php. So the code looks like that:

    HTML Code:
    <label class="inputLabel" for="email-address" onCopy="return false" onDrag="return false" onDrop="return false" onPaste="return false" autocomplete="off"><?php echo ENTRY_EMAIL_ADDRESS; ?></label>
    
    <?php echo zen_draw_input_field('email_address', $account->fields['customers_email_address'], 'id="email-address"') . (zen_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="alert">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>': ''); ?>
    
    <br class="clearBoth" />
    
    <label class="inputLabel" for="email-address-confirm" onCopy="return false" onDrag="return false" onDrop="return false" onPaste="return false" autocomplete="off"><?php echo ENTRY_EMAIL_ADDRESS_CONFIRM; ?></label>
    
    <?php echo zen_draw_input_field('email_address_confirm', $account->fields['customers_email_address'], 'id="email-address-confirm"') . (zen_not_null(ENTRY_EMAIL_ADDRESS_CONFIRM) ? '<span class="alert">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>': ''); ?>
    
    <br class="clearBoth" />
    Again, absolutely no difference on the possibility to copy/paste. That should work but it doesn't. How is this possible?

    If someone want to take a look to help me on this, the adresse of the store is http://www.fc4x4q.com/boutique

  7. #7
    Join Date
    Jul 2012
    Posts
    99
    Plugin Contributions
    0

    Default Re: Prevent copy paste of email confirmation in Confirm Email Address Entry plugin

    No one can help on this one?

    All those who installed the Confirm Email Address Entry plugin really don't care about beeing able to just copy and paste the email in the confirmation field and then bypass this plugin?

  8. #8
    Join Date
    Jul 2012
    Posts
    99
    Plugin Contributions
    0

    Default Re: Prevent copy paste of email confirmation in Confirm Email Address Entry plugin

    I'm still looking for help on this.

  9. #9
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: Prevent copy paste of email confirmation in Confirm Email Address Entry plugin

    As I understand it, autocomplete="off" won't solve your issue anyway. It only turns off (sometimes) the dropdown that appears below an entry box populated with whatever text you have entered in that box before. In the case of creating a Zencart account, the second email address box won't have had anything entered before. It has nothing to do with Copy and Paste.

    My (unsolicited) advice is to forget it. It's probably doable by someone well versed in Javascript, but like the meaningless attempts to disable right-clicking of images, any user who has Javascript disabled won't see it.

  10. #10
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: Prevent copy paste of email confirmation in Confirm Email Address Entry plugin

    Quote Originally Posted by stevesh View Post
    As I understand it, autocomplete="off" won't solve your issue anyway. It only turns off (sometimes) the dropdown that appears below an entry box populated with whatever text you have entered in that box before. In the case of creating a Zencart account, the second email address box won't have had anything entered before. It has nothing to do with Copy and Paste.

    My (unsolicited) advice is to forget it. It's probably doable by someone well versed in Javascript, but like the meaningless attempts to disable right-clicking of images, any user who has Javascript disabled won't see it.
    and to add to this if the OP REALLY needs this and he isn't having luck getting help with this here, he should CONSIDER investing in the services of a developer who can knock this code out for him..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

 

 

Similar Threads

  1. Replies: 31
    Last Post: 7 Feb 2015, 03:36 AM
  2. Problem with installing Confirm Email Address Entry addon
    By ron.guttman in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 19 May 2011, 12:03 AM
  3. Confirm Email Address Entry - Contact Us page
    By MeltDown in forum General Questions
    Replies: 6
    Last Post: 6 Dec 2010, 12:16 AM
  4. Send copy of Contact Us email to 2nd email address
    By JJDoench in forum Basic Configuration
    Replies: 1
    Last Post: 22 Jul 2010, 03:14 PM
  5. AutomaticLogin with Confirm Email Address Entry Problem
    By timlo in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 13 Feb 2008, 05:51 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR