Zen Cart Logo
Forums / Bug Reports / State dropdown added to create account page erroneously

State dropdown added to create account page erroneously

Views: 2,493

Results 1 to 2 of 2
5 Nov 2020, 2:57 PM
#1
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

State dropdown added to create account page erroneously

ZC v1.56c

Pretty sure this is a bug, I've also tested on a ZC v1.57a demo site (I don't have one to hand so used softaculous online demo).

Configuration > Customer Details > State = True
Configuration > Customer Details > State - Always display as pulldown = False
Configuration > Regulations > Confirm Privacy Notice During Account Creation Procedure = True

index.php?main_page=create_account, my fields look like this:

Attachment 19272

If I submit the page without ticking the privacy statement box, on refresh the fields look like this:

Attachment 19273

You can see that the state dropdown has been incorrectly added. Note: I'm using United Kingdom as the country without any zones defined in Locations / Taxes > Zones.

14 Nov 2020, 4:22 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: State dropdown added to create account page erroneously

This is actually "somewhat" by design. If you were to change your selected country (in the countries dropdown) then the State dropdown would fill with zones appropriate to the selected country. When selecting a country without zones the dropdown says "Please type a choice below..." by way of instruction.

Granted, there does appear to be a layout issue with the fields after toggling between countries with and without zones defined.

NOTE: The "trigger" for this is not related to the "privacy/terms checkbox", except insomuch as, as you said, you failed to tick the checkbox thus it failed validation. Any other validation failure (such as duplicated email address, etc) would trigger a similar display.

And, yes, an improvement would be to auto-hide the State dropdown when it's empty, and then re-display it again if the country choice requires it. Indeed I think that's the original intention, but seems to not be operating fully that way in v157.