• Resolved STEVE

    (@solernet)


    This question is regarding the “Address” User Info Field. This field automatically generates all the common address fields. When someone selects the United States for country, the State field is automatically populated with US states. The problem is that the country field is placed after the State field. So logically, someone filling out the form would type in their State before they even get to the Country field. Is there a way to make the Country field automatically populate with United States, so when the user gets to the form, the states are already populated in the State field?

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Contributor Form Maker Support

    (@formmakersupport)

    Hi!

    Please note that you can preselect the country (US)field and it will show the US states automatically in the frontend. However, note that this feature is currently not functioning correctly, but the fix will be available in the upcoming update.

    Thanks for understanding, have a nice day!

    Thread Starter STEVE

    (@solernet)

    @formmakersupport

    Any idea of when this update might be released?

    Thanks

    Plugin Contributor Form Maker Support

    (@formmakersupport)

    Hi!

    Most probably the update will be released at the end of this week or during next week.

    Thanks, have a nice day!

    Plugin Contributor Form Maker Support

    (@formmakersupport)

    Hi @solernet!

    I am sorry but I have mistaken. That issue is not included in the next update. However,
    you can use the below mentioned JS code and set the country field to be the US.
    Please add the code in Form > Form Options > Javascript section.

    // Occurs before the form is loaded
    function before_load() {
    jQuery(‘#wdform_7_country2’).val(‘United States’);
    jQuery(‘#wdform_7_country2’).trigger(‘change’);
    }

    // Occurs before the form is loaded
    function before_load() {
    jQuery(‘#{select_country_id}’).val(‘United States’);
    jQuery(‘#{select_country_id}’).trigger(‘change’);
    }

    Please choose your {select_country_id}. In our case it was wdform_7_country2.
    Please try and provide the feedback.

    Thanks in advance, have a nice day!

    Thread Starter STEVE

    (@solernet)

    Hi @formmakersupport

    So, I did as you instructed above and it didn’t work. Please help.

    Thanks

    Thread Starter STEVE

    (@solernet)

    Hi @pwforaker,

    Have you given the code above a try yet? It didn’t work for me. Any luck?

    Plugin Contributor Form Maker Support

    (@formmakersupport)

    Hi Steve!

    Could you please send us the link of your page? We will have a look and see why the code does not work.

    Thanks in advance!

    Thread Starter STEVE

    (@solernet)

    @formmakersupport

    I’d rather not post that link publicly. Is there a way I can send it to you privately?

    • This reply was modified 6 years, 11 months ago by STEVE.
    Plugin Contributor Form Maker Support

    (@formmakersupport)

    Sure!

    Please contact our support team using the following email address:support@web-dorado.com

    Thanks in advance!

    Thread Starter STEVE

    (@solernet)

    @formmakersupport

    SENT

    ??

    Thanks!

    Thread Starter STEVE

    (@solernet)

    Hi @formmakersupport,

    I still haven’t gotten a response to that email I sent you. Any update?

    Thanks

    Plugin Contributor Form Maker Support

    (@formmakersupport)

    Hi Steve,

    Most probably you haven’t received our reply. We replied to your ticket on 17th April.
    Please delete the code you added before and add the below-mentioned one.

    function before_load() {

    jQuery(“#wdform_10_country1”).val(“United States”);

    jQuery(“#wdform_10_country1”).trigger(“change”);

    }
    Please try and provide the feedback.

    Thanks, have a nice day!

    Thread Starter STEVE

    (@solernet)

    Hi @formmakersupport,

    Yes I never got that reply. However, I deleted the old code and added the new code in the Form > Form Options > Javascript section and it still didn’t work. I made sure to edit the Address Country field to pre-select “United States”, but when the form loads on the web page, the Country field is still blank. Of course if I manually select United States, the State field then switches to a dropdown field containing the states, but I’d really like the country field to already be auto populated with United States.

    Plugin Contributor Form Maker Support

    (@formmakersupport)

    Hi Steve!

    May I ask you to post here the screenshot of the Javascript section in Form Options? Please upload the screenshot and post the link here.

    Thanks in advance, have a nice day!

    Thread Starter STEVE

    (@solernet)

    @formmakersupport

    As you requested… here is the link to the screenshot. https://www.screencast.com/t/i2iAB6dT70

    Hope this helps.

    Thanks

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Automatically populate Country field’ is closed to new replies.