• Kindly can you told us how i can get the list from database and assign it for the items ?

    let say i add this script
    $title_en = array(); // make a new array to hold all your data
    function test() {
    $title_en = array(); // make a new array to hold all your data

    mysql_connect(“localhost”, “root”, “”) or
    die(“Could not connect: ” . mysql_error());
    mysql_select_db(“contactform”);

    $result = mysql_query(“SELECT title_en FROM districts”);

    while ($row = mysql_fetch_array($result, MYSQL_NUM)) {

    $data = $row[0];
    $title_en[$data] = $data;
    }

    mysql_free_result($result);
    return $title_en;
    }

    $items = test();
    private static $items = test(); // not working

    https://www.ads-software.com/plugins/listo/

Viewing 1 replies (of 1 total)
  • There are several ways to do this. You can either implement filter functions to hook into the process of the listo plugin or the contact-form-7 plugin. See my answer in this thread.

    Alternatively you can also use the Post My CF7 Form plugin which allows you to pre-fill form fields before the form is displayed. The plugin also allows you to fill a select field with a taxonomy, so you can maintain your list directly in the dashboard.

Viewing 1 replies (of 1 total)
  • The topic ‘get list from databse’ is closed to new replies.