Skip Navigation

[Resolved] Pre-populate state dropdown fields

This support ticket is created 6 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

Tagged: 

This topic contains 9 replies, has 2 voices.

Last updated by Minesh 6 years, 9 months ago.

Assisted by: Minesh.

Author
Posts
#618071

How can I pre-populate the US states into the select dropdown with CRED?

#618123

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - I would like to know here, from where the US states values as dropdown options will be coming from?

Do you have CPT setup as US states or custom taxonomy?

#618204

I have a "State" field in the CPT. I would like to know how to populate it with US States. I am not seeing any mention of how in support.

Thank you for your help

#618207

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - is "State" field holds US states values and is field type is select?

#618220

Correct.

#618222

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Could you please share problem URL where you added CRED form?

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#618268

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thanks for sharing access details. When I try to access the wp-admin it asks authorization access. Could you please share it.

There is no option available to load bulk options for US States until we add some custom code. I know nothing is broken but I need to check how you setup current field and how you are displaying it with CRED form.

I have set the next reply to private which means only you and I have access to it.

#618295

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - I see that the there is a field State and City attached to Job application post type and the field type is single line.

To list all States or Cities as dropdown, you need to either setup State as CPT OR taxonomy then later on we can add it as a select dropdown.

So, your task is to decide how you want to add state and city as post type or taxonomy, once you setup, let me know and I'll be happy to help you further.

#618349

Okay - this makes sense. I would prefer as a Taxonomy. Still lends the question how to import all states to taxonomy rather than single input each state...

#618355

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - you need to create first custom taxonomy "States" and add all the terms to it Or You may import it using some custom script or plugin.

If you go with taxonomy or select field - then you can easily display it using CRED forms. The task for you is you need to create all terms or select options. Do you have database table for states?