dropdown identical

Home Forums Quform WordPress dropdown identical

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

    you can receive the same data in all forms of the same dropdown id
    Ex: ihporm_1_1 xx db populated with customers
            ihporm_1_2 xx db populated with customers
            ihporm_1_3 xx db populated with customers

    ihporm_1_2 and ihporm_1_3 are identical to ihporm_1_1
    thanks claudio

    #7381
    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.

    #7382
    radacla
    Participant

    Ok thanks.
    Claudio

    #7396
    radacla
    Participant

    forgive me, I tried to solve by using the shotrcode
      [iphorm id = 1 name = "Contact form" values ​​= "items = Banana & Apple my_parameter2 ="]
    in a form dropdown, but remains Option 1, Option 2, etc.
    Because if I put the shortcode in the page worpress does not work?
    I thank you in advance, Claudio

    #7412
    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.

    #7429
    radacla
    Participant

    Thanks Ally, one last thing, I should take the data from two different tables in the same db and populate the dropdown form of the same form, how could I do? I tried but without results.
    thanks Claudio

    #7449
    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.

    #7455
    radacla
    Participant

    Thanks Ally, I try and let you know.
    regards Claudio

    #7676
    radacla
    Participant

    Ok, I tried with this code, but now the dropdown displays the double entries.
    What is the problem?

    function enterreport_dynamic_dropdown_values($form)
    {
    $options = array_merge($options, $options1);
    $dbc = mysqli_connect('localhost', 'xxx', 'xxx', 'bresaola_clienti');
    $query = "SELECT * FROM ragione_sociale,articoli ";
    $result = mysqli_query($dbc, $query);

    while ($row = mysqli_fetch_assoc($result)) {
    $options[] = array('label' => $row['cl'], 'value' => $row['cl']);
    $options1[] = array('label' => $row['art'], 'value' => $row['art']);
    }

    $dropdown = $form->getElement('iphorm_12_22');
    if ($dropdown instanceof iPhorm_Element_Select) {
    $dropdown->setOptions($options);
    }

    $dropdown = $form->getElement('iphorm_12_48');
    if ($dropdown instanceof iPhorm_Element_Select) {
    $dropdown->setOptions($options1);
    }

    $dropdown = $form->getElement('iphorm_12_49');
    if ($dropdown instanceof iPhorm_Element_Select) {
    $dropdown->setOptions($options1);
    }

    }
    add_action('iphorm_pre_display_12', 'enterreport_dynamic_dropdown_values');

    thanks Claudio

    • This reply was modified 10 years, 5 months ago by radacla.
    #7679
    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