Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2013
    Posts
    3
    Plugin Contributions
    0

    Default How to stop users entering comma's into address fields

    Hello Everyone, Looking for some assistance to stop users from entering comma's into the address fields, I know I can code the "[a-zA-Z]" into the code but I need help finding out just where abouts to add the code. Cheers

  2. #2
    Join Date
    Nov 2005
    Location
    France
    Posts
    576
    Plugin Contributions
    8

    Default Re: How to stop users entering comma's into address fields

    And why do you want to stop shoppers using commas in their addresses?

  3. #3
    Join Date
    Feb 2013
    Posts
    3
    Plugin Contributions
    0

    Default Re: How to stop users entering comma's into address fields

    Hello Strelitzia, The main and only reason to restrict the customer entering commas into name and address fields is when the order data is exported to either MYOB of a third party label or reporting program the commas can play havoc with the .txt file formatting. I'd like to restrict the entry to A-Z a-z 0-9 - . / only.

    Cheers

  4. #4
    Join Date
    Sep 2008
    Posts
    210
    Plugin Contributions
    21

    Default Re: How to stop users entering comma's into address fields

    Our Site: http://zucando.com
    Marketing Plugins: Marketing Modules
    Free Response Templates: Responsive Templates

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: How to stop users entering comma's into address fields

    I don't know about restricting entry, but you can always take the entered value and delete every comma, or swap for a space, before storing/using.


    Yes, with str_replace(',',' ',$address)

  6. #6
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,674
    Plugin Contributions
    123

    Default Re: How to stop users entering comma's into address fields

    Hang on - @petsupplies4u, are you sure your order exporting program doesn't handle this? Typically fields will be enclosed in a value (like quotation marks, for example) so that commas within fields are ignored.

    "Joe Smith", "10 Foo St., Apt 12", "Jonesville", "NSW"
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 

Similar Threads

  1. v138a Can I stop customers from entering alternate shipping address?
    By sampook in forum General Questions
    Replies: 3
    Last Post: 18 Apr 2014, 12:18 AM
  2. [Done v1.6.0] address format table comma
    By dw08gm in forum Bug Reports
    Replies: 3
    Last Post: 29 Aug 2013, 10:32 PM
  3. 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
  4. Entering products directly into database
    By neit in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 10 Feb 2010, 04:48 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