Geolocation

Home Forums Quform WordPress Geolocation

This topic is: resolved
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #19160
    albert_12345
    Participant

    Hello,

    Thanks for an awesome plug-in.

    I need a dropdown where the user’s location (country) is pre-selected.

    I’ve already installed the plug-in ‘GeoIP Detection’ and it’s using Maxmind’s ‘GeoLite2 City database’.

    I’m wondering what is the next step. Sorry, I’m not really a PHP developer.

    Please help. Thanks.

    _albert

    #19161
    albert_12345
    Participant

    – So I checked ‘Dynamic default value.
    – I put ‘country’ as the Parameter name
    – Then on functions.php of the theme i’m using i added:

    add_filter(‘iphorm_element_value_country’, ‘mytheme_set_country’);

    function mytheme_set_country($value)
    {
    $record->country->name;
    }

    Am I missing something?

    Thanks in advance!

    #19245
    albert_12345
    Participant

    anybody?

    #19246
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #19248
    albert_12345
    Participant

    Thank you!

    It works now!

    #26135
    currentware
    Participant

    Is it possible to input the country into one of Quform’s hidden fields?

    #26138
    currentware
    Participant

    Ally,

    Can you help me out? I am trying to use the same plugin to get the city, state and country to auto fill into my QuForm.

    I took you code and added to my WordPress Theme Functions (functions.php):

    function mytheme_set_country()
    {
    $record = geoip_detect2_get_info_from_current_ip();

    return $record->country->name;
    }
    add_filter(‘iphorm_element_value_country’, ‘mytheme_set_country’);

    The country value is being displayed in the shortcut, but it is not showing up in the dropdown menu.

    Looking forward to your assistance!

    Attachments:
    You must be logged in to view attached files.
    #26141
    currentware
    Participant

    I am using QuForm 2!

    #26166
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #26181
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy