Hi
In the user registration form, the country can be selected from a drop down list.
The drop down list does not show in the "state" field, and reports an error saying "please select from list".
How do I change the state field to show that there is a list to select from, and maybe add "select from list" as the default field entry in the box ?
How can I make the field in "country" to default to "UK" if it is the only field entry anyway ?
State on user registration form
-
heatherbell
- Senior Contributor
- Posts: 2540
- Joined: Mon Oct 07, 2019 4:39 am
- Phoenix Version:
- Has thanked: 35 times
- Been thanked: 243 times
Re: State on user registration form
This addon might help - app.php/addons/supporters_code/s03e08_c ... _selector/solarsurfer wrote: ↑Fri Feb 11, 2022 8:18 am Hi
In the user registration form, the country can be selected from a drop down list.
The drop down list does not show in the "state" field, and reports an error saying "please select from list".
How do I change the state field to show that there is a list to select from, and maybe add "select from list" as the default field entry in the box ?
How can I make the field in "country" to default to "UK" if it is the only field entry anyway ?
Seen in demo here - https://template.me.uk/PRO/S3/create_account.php
-
heatherbell
- Senior Contributor
- Posts: 2540
- Joined: Mon Oct 07, 2019 4:39 am
- Phoenix Version:
- Has thanked: 35 times
- Been thanked: 243 times
Re: State on user registration form
Is UK the only country to which you deliver?solarsurfer wrote: ↑Fri Feb 11, 2022 8:18 am How can I make the field in "country" to default to "UK" if it is the only field entry anyway ?
In which case, maybe the State Customer Data module (which I guess you would be using for UK counties) would not be required as counties are no longer required for delivery addresses in UK anyway.
-
solarsurfer
Re: State on user registration form
Hi
Can someone please tell me which php file processes the "user registration" form and sends the data to the sql tables and I can amend the php to get it running right ?
Thanks in advance
Can someone please tell me which php file processes the "user registration" form and sends the data to the sql tables and I can amend the php to get it running right ?
Thanks in advance
- Kofod95
- Senior Contributor
- Posts: 748
- Joined: Sat Feb 06, 2021 7:38 pm
- Phoenix Version: 1.0.8.20
- Has thanked: 99 times
- Been thanked: 179 times
Re: State on user registration form
I think here: https://github.com/CE-PhoenixCart/Phoen ... _state.phpsolarsurfer wrote: ↑Sat Feb 12, 2022 10:43 am Hi
Can someone please tell me which php file processes the "user registration" form and sends the data to the sql tables and I can amend the php to get it running right ?
Thanks in advance
In which case it's even better: You can just make a new module to do what you want.
There are in fact not many cases in which you need to amend the core files.
//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
Here are a lot of corns: Phoenix user guide
Re: State on user registration form
Hi guys, so this should be an easy fix on the first attempt the user does not get a drop download list for state
But if you put something in wrong or make a spelling mistake, the drop-down is offered to you?
And I also get the error displayed twice to me Questions
1. How do I have the dropdown offered the first time round
2. Why is the user being presented with 2 lines show the error
Thanks Troy
And I also get the error displayed twice to me Questions
1. How do I have the dropdown offered the first time round
2. Why is the user being presented with 2 lines show the error
Thanks Troy
You do not have the required permissions to view the files attached to this post.
Re: State on user registration form
Thank you all,
This has been resolved with an add-on Country State Selector
This has been resolved with an add-on Country State Selector
- burt
- Core Team
- Posts: 4550
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 412 times
Re: State on user registration form
For those having a similar issue in the future;
The states dropdown depends solely on the country dropdown, and whether the selected country has "zones" set up. As an example:
USA would have 50 or so zones (california, wyoming, florida etc).
Australia would have 10 or so zones (western australia, queensland etc).
At the point of registration when the create_account page loads, there is no easy way to know which country the user is from, therefore there is no way to know to load the correct states dropdown.
This means another way must be found to load the states after the country is selected (if you do not like the basic behaviour of Phoenix [reload page asking user to select from list]), which in this case can be done with some javascript (one of which is the PRO addon mentioned above).
The states dropdown depends solely on the country dropdown, and whether the selected country has "zones" set up. As an example:
USA would have 50 or so zones (california, wyoming, florida etc).
Australia would have 10 or so zones (western australia, queensland etc).
At the point of registration when the create_account page loads, there is no easy way to know which country the user is from, therefore there is no way to know to load the correct states dropdown.
This means another way must be found to load the states after the country is selected (if you do not like the basic behaviour of Phoenix [reload page asking user to select from list]), which in this case can be done with some javascript (one of which is the PRO addon mentioned above).
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.