osCmax v2.5 User Manual
Results 1 to 2 of 2

how to set maxlength on an input field?

This is a discussion on how to set maxlength on an input field? within the osCmax v1.7 Discussion forums, part of the osCmax v1.7 Forums category; I need to restrict the max chars on the street address field of the Create An Account form to 30 ...

      
  1. #1
    New Member
    Join Date
    Dec 2006
    Posts
    5
    Rep Power
    0


    Default how to set maxlength on an input field?

    I need to restrict the max chars on the street address field of the Create An Account form to 30 chars. I know I could set this in the database but I need to restrict it on the html form. Otherwise the additional chars would just get cut off when the data is inserted and we wouldn't have a complete address. Does anyone know how to do this?

    I know if it were a regular html form I would just set maxlength="30" in the input field but since the form is constructed from a class I'm having a hard time tracing back to see what method might be available & how to use it.

    Thanks!

  2. #2
    New Member
    Join Date
    Dec 2006
    Posts
    5
    Rep Power
    0


    Default Re: how to set maxlength on an input field?

    Hey, I figured it out. Maybe this will help someone else:

    tep_draw_input_field('street_address', '', 'maxlength="30"')

Similar Threads

  1. Need to add input text field in product attributes
    By bethphilbin in forum osCommerce 2.2 Modification Help
    Replies: 15
    Last Post: 08-07-2006, 07:48 PM
  2. Attributes, Text Input + Price
    By donm1021 in forum osCommerce 2.2 Discussion
    Replies: 0
    Last Post: 08-07-2006, 11:58 AM
  3. Input Field Width???
    By OmarC in forum osCommerce 2.2 Modification Help
    Replies: 3
    Last Post: 12-20-2004, 09:45 AM
  4. Problem with Input Field type - must restrict chars...
    By Anonymous in forum osCmax v1.7 Discussion
    Replies: 4
    Last Post: 02-26-2004, 03:43 PM
  5. Positioning order of Customer Input Boxes
    By WebMistress in forum osCommerce 2.2 Modification Help
    Replies: 6
    Last Post: 11-10-2003, 07:45 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
  •