Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Adjust Width, Country Select Field, Create Account Template

Adjust Width, Country Select Field, Create Account Template

Views: 623

Results 1 to 6 of 6
2 Mar 2014, 8:38 AM
#1
kenbaker avatar

kenbaker

New Zenner

Join Date:
Dec 2012
Posts:
66
Plugin Contributions:
0

Adjust Width, Country Select Field, Create Account Template

Regarding this select box,

how might I adjust the width? The widths of most other fields in this template are determined by the database settings, but I can't find the width setting for the country select field. I thought that it might be specified in the relevant zen_get or zen_draw function, but I can't find it there.

Thanks,

Ken Baker

2 Mar 2014, 1:36 PM
#2
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Adjust Width, Country Select Field, Create Account Template

Have a look at includes/templates/YOUR_TEMPLATE/templates/tpl_modules_create_account.php :)

2 Mar 2014, 6:04 PM
#3
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,081
Plugin Contributions:
56

Re: Adjust Width, Country Select Field, Create Account Template

The width of the country-select field is, for the most part, controlled by the country with the longest name. If you've not disabled any of the standard Zen Cart countries, that would be "South Georgia and the South Sandwich Islands" (quite the mouthful!).

3 Mar 2014, 2:23 AM
#4
kenbaker avatar

kenbaker

New Zenner

Join Date:
Dec 2012
Posts:
66
Plugin Contributions:
0

Re: Adjust Width, Country Select Field, Create Account Template

lat9,

Thanks for responding. As a result of your response, I discovered where to find the country list (in a mySQL table, duh), and of course I learned (as you pointed out) that the default length of the select field is determined by the longest country name ("Macedonia, the Former Yugoslav Republic of" gives South Georgia a close run for its letter money). As it turns out, though, it is possible to specify a width for the country select field. I only needed to add the style attribute to the parameters. For some strange reason, I got the idea that the parameters variable wouldn't pass on style attributes, just id and class. Live and learn. twitchtoo, by the way, suggested that I take a closer look (I thought that I'd looked closely already, but hadn't) at the tpl_modules_create_account.php, and sure enough, there it was, staring me in the face.

Thanks again for the direction.

Ken Baker

PS: Did a good bit of stomping in the Stuart area back in the day.

3 Mar 2014, 2:31 AM
#5
kenbaker avatar

kenbaker

New Zenner

Join Date:
Dec 2012
Posts:
66
Plugin Contributions:
0

Re: Adjust Width, Country Select Field, Create Account Template

twitchtoo,

Honestly, I felt sure that I had studied that template practically to death, but when I read your note I sighed and took one last quick glance at it, just to report that I had, and sure enough the solution popped right out at me. If it'd been a snake, it would have throttled me. Thanks for the help.

Ken Baker

3 Mar 2014, 3:53 AM
#6
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Adjust Width, Country Select Field, Create Account Template

I'm glad I could help :)