Home › Forums › Quform WordPress › Dropdown Values from SQL query
Hi,
currently I have a dropdown which gets all the users from the WP database:
function my_dropdown_users(iPhorm $form) { $dropdown = $form->getElement('iphorm_27_3'); if ( ! $dropdown instanceof iPhorm_Element_Select) { return; } $users = array(); foreach (get_users() as $user) { $users[] = array( 'label' => $user->display_name, 'value' => $user->display_name ); } $dropdown->setOptions($users); } add_filter('iphorm_pre_display_27', 'my_dropdown_users');
I was wondering if it was possible to (and how to) change the array to pull info from any given table using a SELECT statement.
Thanks in avance! Marcel
You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.