The way is to add the filter that was listed in frm_setup_new_fields_vars, to display the UserID in the dropdown for admins. One can add another filter with the following alteration to the code, in this case for the Editor role:
add_filter('frm_setup_new_fields_vars', 'show_user_dropdown_editor', 15, 2); add_filter('frm_setup_edit_fields_vars', 'show_user_dropdown_editor', 15, 3); function show_user_dropdown_editor($values, $field, $entry_id=false){ if ( $values['type'] == 'user_id' && !is_admin() && current_user_can('editor') ){ $values['type'] = 'select'; $values['options'] = FrmProFieldsHelper::get_user_options(); $values['use_key'] = true; $values['custom_html'] = FrmFieldsHelper::get_default_html('select'); } return $values; }
And of course, the original code is for the admin:
add_filter('frm_setup_new_fields_vars', 'show_user_dropdown', 15, 2); add_filter('frm_setup_edit_fields_vars', 'show_user_dropdown', 15, 3); function show_user_dropdown($values, $field, $entry_id=false){ if ( $values['type'] == 'user_id' && !is_admin() && current_user_can('administrator') ){ $values['type'] = 'select'; $values['options'] = FrmProFieldsHelper::get_user_options(); $values['use_key'] = true; $values['custom_html'] = FrmFieldsHelper::get_default_html('select'); } return $values; }
With both codes the Administrator and Editor roles will see the dropdown to change the UserID for any entry, on the front-end. This must work for other roles as well.