Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Size of input fields on tpl_module_create_account.php

Size of input fields on tpl_module_create_account.php

Locked

Views: 1,480

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
8 Sep 2010, 9:49 PM
#1
gomlers avatar

gomlers

Zen Follower

Join Date:
Aug 2008
Posts:
139
Plugin Contributions:
0

Size of input fields on tpl_module_create_account.php

I need to find the place where I can change the field-size of the postalcode.

Not the maxlenght of characters, but the actual visible fieldsize.

as in: <input type="blah" size="18">

Anyone? I've been searching for it for several hours, both on google and in my files, but I cant figure it out :frusty:

8 Sep 2010, 9:52 PM
#2
fragageddon avatar

fragageddon

New Zenner

Join Date:
Jul 2010
Posts:
79
Plugin Contributions:
0

Re: Size of input fields on tpl_module_create_account.php

That should be controlled through the CSS file.

8 Sep 2010, 10:00 PM
#3
gomlers avatar

gomlers

Zen Follower

Join Date:
Aug 2008
Posts:
139
Plugin Contributions:
0

Re: Size of input fields on tpl_module_create_account.php

omg..! I haven't even thought of that!! Thanks! I'll check it out right away! :)

8 Sep 2010, 10:08 PM
#4
gomlers avatar

gomlers

Zen Follower

Join Date:
Aug 2008
Posts:
139
Plugin Contributions:
0

Re: Size of input fields on tpl_module_create_account.php

Hmm.. would you know where to look, or what to type to control the size?

8 Sep 2010, 10:30 PM
#5
gomlers avatar

gomlers

Zen Follower

Join Date:
Aug 2008
Posts:
139
Plugin Contributions:
0

Re: Size of input fields on tpl_module_create_account.php

finally - i can't believe I didn't think of the CSS file.. LOL!
But I solved it like this, if anyone else wonders:
**
In /includes/templates/YOUR_TEMPLATE/templates/tpl_modules_create_account.php:**

find this line:

<?php echo zen_draw_input_field('postcode', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_postcode', '20') . ' id="postcode"') . (zen_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="alert">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?>

**
change to this:**

<?php echo zen_draw_input_field('postcode', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_postcode', '20') . ' id="postcode" class="YOUR_NEW_CLASS"') . (zen_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="alert">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?>

name "YOUR_NEW_CLASS" whatever your want.

in your: /includes/templates/YOUR_TEMPLATE/css/stylesheet.css

make the class like this:

input.YOUR_NEW_CLASS {
width: 130px;

  • any other type of attributes here as wanted
    }

you can of course attach your new class to all of the other input fields too if you want them to look the same.

Hope it helps someone, sometime ;)

10 Sep 2010, 3:48 AM
#6
fragageddon avatar

fragageddon

New Zenner

Join Date:
Jul 2010
Posts:
79
Plugin Contributions:
0

Re: Size of input fields on tpl_module_create_account.php

Gomlers:

finally - i can't believe I didn't think of the CSS file.. LOL!
But I solved it like this, if anyone else wonders:
**
In /includes/templates/YOUR_TEMPLATE/templates/tpl_modules_create_account.php:**

find this line:

<?php echo zen_draw_input_field('postcode', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_postcode', '20') . ' id="postcode"') . (zen_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="alert">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?>

**
change to this:**

<?php echo zen_draw_input_field('postcode', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_postcode', '20') . ' id="postcode" class="YOUR_NEW_CLASS"') . (zen_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="alert">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?>

name "YOUR_NEW_CLASS" whatever your want

in your: /includes/templates/YOUR_TEMPLATE/css/stylesheet.css

make the class like this:

input.YOUR_NEW_CLASS {
width: 130px;

  • any other type of attributes here as wanted
    }

you can of course attach your new class to all of the other input fields too if you want them to look the same.

Hope it helps someone, sometime ;)That's way to much work dude. Like I said it's controlled through the css file and all you had to do was add:

#postcode {
        width: 120px;
} 

If you are using firefox, download firebug and developers toolkit.
Hitting CTRL+SHIFT+F, then you can click on things and it tells you info about it.

11 Sep 2010, 11:51 AM
#7
gomlers avatar

gomlers

Zen Follower

Join Date:
Aug 2008
Posts:
139
Plugin Contributions:
0

Re: Size of input fields on tpl_module_create_account.php

Thank you ;)
That's a much better way.. :D but to be honest, the postcodefield was a tough one. At least I thought. Because I tried your solution at first, but when I checked the sourcecode, the postcodefield was the only field that had 11px. Therefor I assumed that this was written inside the code somewhere.

And that's why I made a whole new class.

It might just be that I had a typo I didn't see when I tried to use the id-tag - since it didn't work.