Tagged: City State Country dropdown
May 28, 2014 at 9:21 pm #21132
How I can create a City/State/Country dynamic dropdown list in my “WP User Frontend Pro” form?
AlexanderMay 29, 2014 at 2:48 pm #21160
What you are asking, is kind of Complex right now. WPUF don't provide base functionality for Conditional Logic, Which is coming from our next update landing next month. Till then, Either you have to write the whole thing based on jQuery or Using WPUF action hook.May 29, 2014 at 9:34 pm #21191
I have a list of countries, states and cities.
What WPUF action hooks I need to use in order to create City/State/Country dynamic dropdown?
AlexanderMay 29, 2014 at 10:25 pm #21195
We have a Full Featured Documentation Section about the Action Hook. Please check here: http://docs.wedevs.com/using-action-hook-field/May 31, 2014 at 1:00 am #21257
In this documentation I find that WP User Frontend gives two actions: 1) when a post is submitted: wpuf_add_post_after_insert or 2) when a post is updated wpuf_edit_post_after_update.
However, I need some action when user edit post and before submitting/updating. For example, when user is change country dropdown selection, than the states dropdown list is changes also.
What WPUF action I can to use in this case?
Is this conditional logic coming in you next version? If yes, I can wait next month.
AlexanderMay 31, 2014 at 3:01 am #21263
Yes, Conditional Logic is coming next month. Probably the 2nd Week.July 26, 2014 at 3:25 am #24130
I install new version of WP User Frontend Pro 2.2.3.
I try to implement the simple example with two dropdown fields country and city. Country dropdown field contain two items:USA,Canada and city dropdown field contain four items: New York,Las Vegas, Toronto, Ottawa.
I would like to show cities of selected country, but without result.
Is't possible to use conditional logic to implement this example?
AlexanderJuly 27, 2014 at 8:56 am #24158
Very much possible Alexander.
Step 1: Create a drop down field with country list
Step 2: Create another drop-down City list (USA Field) with meta name city_usa and put your 2 city names.
Then, mark conditional logic = yes.
now, select Country field and “is equal to” USA
Step 3: Create another drop-down field for Canada with meta name City_canada and put your city names
then same as Step 2 mark Conditional logic = yes
and, Select Country field “is equal to” Canada
Thats it.July 27, 2014 at 1:49 pm #24178
I've been all the steps, but this not working. If I select USA/Canada then no reaction on “conditional logic” flag. The wpuf form displays three drop-down fields : country_field, city_usa and city_canada.
Is need any additional step for “conditional logic” ? Have you example and documentation about “conditional logic”?July 27, 2014 at 2:10 pm #24179
i am not sure how easily i can explain!
you have to select Conditional logic on two city fields only not country field.July 27, 2014 at 4:56 pm #24188
I understand you.
I create three “Dropdown Custom Fields” and select on two city fields only :
“Country is equal to USA/Canada” and
“Show this field when “any” these rules are met”.
But “conditional logic” has no effect.
Can you test your example or may be I need additional setting?July 27, 2014 at 5:13 pm #24189
i tested my self. It is working fine. Would you mind to share your site login details then to check? please reply as private.July 31, 2014 at 6:51 pm #24350
I test this example and understand that solution with three drop-down lists is not suite for me.
Therefore, I would like to extend my existed ‘wpuf' form (contain user data like name,birthday,etc.) and create by program code two drop-down fields( ‘country','region').
How and where I can create a drop-down input field by program code to existed ‘wpuf' form?
How I can add values to drop-down field from mySql table?August 1, 2014 at 5:34 am #24360
Not sure what do you mean by two/three drop-down field. People will see only two Drop-down fields if you apply conditional logic and you can easily manage data by using two different meta_key.
WPUF uses default WordPress data table. _postmeta > meta_key
But, It is not recommend to edit SQL file directly.
The topic ‘Create City/State/Country Dynamic Drop-Down List’ is closed to new replies.