Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / size of input fields

size of input fields

Views: 1,396

Results 1 to 5 of 5
11 Feb 2011, 9:10 PM
#1
luciano9876 avatar

luciano9876

New Zenner

Join Date:
Jan 2011
Posts:
26
Plugin Contributions:
0

size of input fields

How can I change the size of input fields like telephone number, etc?

I found the files tpl_modules_create_account.php and tpl_modules_no_account.php in includes/templates/my_template/templates

Code for one of the input fields:

<label class="inputLabel" for="postcode"><?php echo ENTRY_POST_CODE; ?></label>
<?php echo zen_draw_input_field('postcode', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_postcode', '40') . ' id="postcode"') . (zen_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="alert">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?>
<br class="clearBoth" />

It seems like there is a size of 40 (each of the input labels have that), a maximum size I was told. The result is that many fields have different sizes and I would like them to have a uniform size, because I think it looks nicer. I just cannot figure out how to do that. Please help.

12 Feb 2011, 2:27 AM
#2
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: size of input fields

you have to change your database table

zen_address_book

entry_postcode

change the varchar Length/Values

12 Feb 2011, 8:56 AM
#3
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: size of input fields

You can make them all the same size with css, also. Throw this in your stylesheet and enjoy a nice, uniform 150px width:

input#company {width: 150px;  }
input#firstname {width: 150px; }
input#lastname {width: 150px; }
input#street-address {width: 150px;}
input#suburb {width: 150px;}
input#city {width: 150px; }
input#state {width: 150px; margin-right: -3px;}
input#postcode {width: 150px;}
select#country {width: 155px; margin-right: -2px;}
input#telephone {width: 150px;}
input#fax {width: 150px;}
input#dob {width: 150px;}
input#email-address {width: 150px;}
input#password-new {width: 150px;}
input#postcode {width: 150px;}
input#password-confirm {width: 150px}
```Hope this helps.
12 Feb 2011, 4:42 PM
#4
luciano9876 avatar

luciano9876

New Zenner

Join Date:
Jan 2011
Posts:
26
Plugin Contributions:
0

Re: size of input fields

Thanks! The CSS solution works indeed. I also had to edit no_account.css (beacause of fast and easy checkout), but that was easy to figure out once you told me where to look.

:thumbsup:

12 Feb 2011, 6:41 PM
#5
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: size of input fields

luciano9876:

Thanks! The CSS solution works indeed. I also had to edit no_account.css (beacause of fast and easy checkout), but that was easy to figure out once you told me where to look.

:thumbsup:

Not a problem. Glad to help.