Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2013
    Location
    Texas
    Posts
    304
    Plugin Contributions
    0

    Default Address book restrictions

    Discovered I also need to allow only "A-Za-z0-9 " when customers enter addresses in the address book.
    Couldn't find any exact examples and tried several different ways/tests but can't make it work
    Thanks,

    FILE:
    tpl_modules_address_book_details.php
    Code:
    <?php
      if (ACCOUNT_COMPANY == 'true') {
    ?>
    <label class="inputLabel" for="company"><?php echo ENTRY_COMPANY; ?></label>
    <?php echo zen_draw_input_field('company', $entry->fields['entry_company'], zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_company', '40') . ' id="company" placeholder="' . ENTRY_COMPANY_TEXT . '"' . (ACCOUNT_COMPANY == 'true' && (int)ENTRY_COMPANY_MIN_LENGTH != 0 ? ' required' : '')); ?>
    <br class="clearBoth" />
    <?php
      }
    ?>
    Last edited by swguy; 7 Feb 2020 at 01:36 PM.

  2. #2
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: Address book restrictions

    While the provided section of code doesn't really deal with the requested sanitization, be sure that whatever sanization is being applied that it is accurate for the scope of use. I.e. If services are offered/allowed for say Germany, would need to be sure that characters such as ö, ü, ß, etc... are permitted or for Latin or French languages characters such as é, ì, ñ, etc... are permitted. I haven't tested out the suggested regex to see that such characters are excluded, but have a feeling that they are...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Replies: 9
    Last Post: 7 May 2016, 06:39 PM
  2. How can I stop requiring address on address book page?
    By jaredt112 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 14 Apr 2010, 02:30 AM
  3. Move Address Book entries on Shipping Address page
    By giftmeister in forum Basic Configuration
    Replies: 0
    Last Post: 17 May 2009, 07:30 PM
  4. Replies: 8
    Last Post: 1 Apr 2009, 05:26 PM

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