Show IP location in results table

[ad_1]

Hi,

I need a solution to the following problem.

The following code displays the results table of a form usage:
[CP_CALCULATED_FIELDS_RESULT_LIST formid=”1″ layout=”table” table_head=”IP,Name,Email,Results,Link” table_fields=”ipaddress,fieldname1,fieldname2,fieldname3,thank_you_page”]

Instead of the IP, I would like to display the location.
For this I used the following script, but I don’t know how to insert it in the results table.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>    
<input class="ip" value="">
    <button class="send">Vezi adresa IP</button>
    <span class="city"></span>,
    <span class="country"></span>

    <script>
        $('.send').on('click', function () {

            $.getJSON('https://ipapi.co/' + $('.ip').val() + '/json', function (data) {
                $('.city').text(data.city);
                $('.country').text(data.country);
            });
        });
    </script>

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer