Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2008
    Location
    Uk
    Posts
    79
    Plugin Contributions
    0

    Default Input Box Length ?

    Hi.

    I was wondering how I would go about limiting the length of an input box. here's the code.. I tried the way I did it in create account but it gives me a blank page and won't have it !. I need to shorten the length to about 5 characters instead of 15ish !


    <label class="inputLabel" for="fax"><?php echo ENTRY_FAX_NUMBER; ?></label>
    <?php echo zen_draw_input_field('fax', $account->fields['customers_fax'], 'id="fax"') . (zen_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="alert">' . ENTRY_FAX_NUMBER_TEXT . '</span>': ''); ?>
    <br class="clearBoth" />

    I hope someone can assist.

    Cheers
    J#xx
    (Scott Perry)

  2. #2
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Input Box Length ?

    I've never seen a fax number of only 5 digits ...


    Have you tried adjusting the length by a simple stylesheet edit, referencing the #fax id selector?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: Input Box Length ?

    As the good doctor indicates... There's a big difference between the VISIBLE length of the field, and the number of characters it should contain...

  4. #4
    Join Date
    Dec 2008
    Location
    Uk
    Posts
    79
    Plugin Contributions
    0

    Default Re: Input Box Length ?

    Hi,

    The database has a limit of 6 characters in it for this field, so even if you put more than that it would only return the first 6. However.. The fax bit is only a reference to the code I actually need to alter to specify a set length in the input box.

    I tried the zen_set_field_length code but no luck, any suggestions ?

    Cheers
    J#xx
    (Scott Perry)

  5. #5
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Input Box Length ?

    Quote Originally Posted by J#xx View Post
    I tried the way I did it in create account but it gives me a blank page and won't have it !.
    So ... when you got the blank page, what error was trapped in the debug log?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Dec 2008
    Location
    Uk
    Posts
    79
    Plugin Contributions
    0

    Default Re: Input Box Length ?

    Hi,

    I did'nt use a debug thingy, What's a debug ? I just guessed it. But this time it still won't work. If you know the answer can you point me in the right direction as my boss is getting a little arsey.

    Cheers
    J#xx
    (Scott Perry)

  7. #7
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Input Box Length ?

    https://www.zen-cart.com/tutorials/index.php?article=82 ... see the utility mentioned in step 2a
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  8. #8
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Input Box Length ?

    Quote Originally Posted by J#xx View Post
    I did'nt use a debug thingy, What's a debug ? I just guessed it...
    Hey Scott... I once had a boss like that - wanted to know why I didn't know how to fix something up...

    ... so I learned how... pretty quickly too!

    Moral of the story:
    If you parade as a webmaster, better know what a webmaster does!
    20 years a Zencart User

 

 

Similar Threads

  1. Extra 'input' box needed on product info input page
    By abaris in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 1 Apr 2009, 03:40 PM
  2. Advanced search input form length
    By Joseph M in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 17 May 2008, 03:31 AM
  3. How do I increase the length of the customer input fields?
    By nova351 in forum General Questions
    Replies: 9
    Last Post: 14 Dec 2006, 07:27 AM
  4. Input Name Add Character Length
    By oceano in forum Customization from the Admin
    Replies: 1
    Last Post: 25 Sep 2006, 03:09 AM

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