The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group

Slack Signup
Newsletter Optin
Help Desk

user id to dropdown

Labels

This Discussion is public

Notifications

I have been using this function to change the user id to a dropdown with editing permission up to contributor and now it doesn't seem to be working. Any ideas?

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('contributor') ){
$values['type'] = 'select';
$values['autocom'] = 1;// make it autocomplete
$values['options'] = FrmProFieldsHelper::get_user_options();
$values['use_key'] = true;
$values['custom_html'] = FrmFieldsHelper::get_default_html('select');
}
return $values;
}

Discussion closed.