How can i add user display name drop down menu in frontend?

How can i add user display name drop down menu in frontend? then user can choose preferred display name? In fact, I used this code answered here: How to edit a user profile on the front end? submit handler: if (!empty($_POST[‘display_name’])) { update_user_meta($current_user->ID, ‘display_name’, esc_attr($_POST[‘display_name’])); } and form: <p class=”form-display-name”> <label for=”display-name”><?php _e(‘display-name’, ‘profile’);?></label> <select…