Home Forums Plugin Support WP User Frontend Pro Create City/State/Country Dynamic Drop-Down List

This topic is: not resolved

This topic contains 13 replies, has 3 voices, and was last updated by  Mahi 4 years, 10 months ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #21132

    Alexander
    Member
    Post count: 26

    Hello,

    How I can create a City/State/Country dynamic dropdown list in my “WP User Frontend Pro” form?

    Thanks,
    Alexander

    #21160

    Oritro Ahmed
    Spectator
    Post count: 155

    Hello Alexander,

    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.

    #21191

    Alexander
    Member
    Post count: 26

    Hello Ahmed,

    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?

    Thanks,
    Alexander

    #21195

    Oritro Ahmed
    Spectator
    Post count: 155

    Hi there,

    We have a Full Featured Documentation Section about the Action Hook. Please check here: http://docs.wedevs.com/using-action-hook-field/

    #21257

    Alexander
    Member
    Post count: 26

    Hello Ahmed,

    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.

    Thanks,
    Alexander

    #21263

    Oritro Ahmed
    Spectator
    Post count: 155

    Hello Alexander,

    Yes, Conditional Logic is coming next month. Probably the 2nd Week.

    #24130

    Alexander
    Member
    Post count: 26

    Hello,

    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?

    Thanks,
    Alexander

    #24158

    Mahi
    Member
    Post count: 1555

    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.

    #24178

    Alexander
    Member
    Post count: 26

    Hi Mahi,

    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”?

    #24179

    Mahi
    Member
    Post count: 1555

    i am not sure how easily i can explain!

    you have to select Conditional logic on two city fields only not country field.

    #24188

    Alexander
    Member
    Post count: 26

    I understand you.

    I create three “Dropdown Custom Fields” and select on two city fields only :
    “conditional logic=yes”
    “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?

    #24189

    Mahi
    Member
    Post count: 1555

    i tested my self. It is working fine. Would you mind to share your site login details then to check? please reply as private.

    #24350

    Alexander
    Member
    Post count: 26

    Hi,

    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?

    #24360

    Mahi
    Member
    Post count: 1555

    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.

Viewing 14 posts - 1 through 14 (of 14 total)

The topic ‘Create City/State/Country Dynamic Drop-Down List’ is closed to new replies.