Home › Forums › Quform WordPress › dropdown identical
- This topic has 9 replies, 2 voices, and was last updated 11 years, 1 month ago by Ally.
- AuthorPosts
- November 14, 2013 at 5:53 am #7377radaclaParticipant
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 customersihporm_1_2 and ihporm_1_3 are identical to ihporm_1_1
thanks claudioNovember 14, 2013 at 11:19 am #7381AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
November 14, 2013 at 11:23 am #7382radaclaParticipantOk thanks.
ClaudioNovember 14, 2013 at 8:10 pm #7396radaclaParticipantforgive 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, ClaudioNovember 17, 2013 at 10:26 am #7412AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
November 18, 2013 at 5:24 am #7429radaclaParticipantThanks 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 ClaudioNovember 19, 2013 at 9:33 am #7449AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
November 19, 2013 at 11:00 am #7455radaclaParticipantThanks Ally, I try and let you know.
regards ClaudioDecember 1, 2013 at 6:00 pm #7676radaclaParticipantOk, 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 11 years, 1 month ago by radacla.
December 2, 2013 at 9:55 am #7679AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- AuthorPosts
- You must be logged in to reply to this topic.