Zen Cart Logo
Forums / General Questions / How change the Length of field?

How change the Length of field?

Views: 963

Results 1 to 2 of 2
22 Jul 2012, 6:33 PM
#1
dmagic avatar

dmagic

Totally Zenned

Join Date:
Oct 2008
Posts:
594
Plugin Contributions:
0

How change the Length of field?

How change the Length of filling Password

Attachment 10851

Thanks for help

23 Jul 2012, 7:05 AM
#2
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: How change the Length of field?

dmagic:

How change the Length of filling Password

There isn't a setting for this (that I'm aware of), which means you'll need to edit the login template file.

The default file for this is
/includes/templates/template_default/templates/tpl_login_default.php

Line#76 (or thereabouts) zencart v1.5.0 currently reads:

<?php echo zen_draw_password_field('password', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_password') . ' id="login-password"'); ?>

As you can (hopefully) see, the field length is currently being set to match the size of the customers password datafield. You'll need to change this code to use a smaller value (assuming that's what you want).

Something like the following should do it.

<?php echo zen_draw_password_field('password', '', 'size = "20" ' . '  id="login-password"'); ?>

The code above will/should set the size to 20 characters.

Cheers
Rod

ps. I suggest you use the override system rather than editing the default file.