Saving wp_dropdown_users choice on the page
-
I am trying to use wp_dropdown_users in order to save a users name to an inventory item. Currently I am using WP Inventory Manager. I am trying to have it set where you can choose a user from the wp_dropdown_users drop-down and save it for that entry.
/**
* @param $item
*/
function my_custom_function( $item ) {
wp_dropdown_users( array(‘show_option_none’ => __(‘No user selected’) ) );}
add_action( ‘wpim_admin_pre_edit_item’, ‘my_custom_function’ );
This code is generating my User list drop-down on the inventory pages.
I don’t have a lot of experience with mySQL, but I’m assuming I need to save it to a database using POST somehow? I’m not much of a back-end coder so I’m just kind of lost at how to tackle this.
- The topic ‘Saving wp_dropdown_users choice on the page’ is closed to new replies.