Make UserID field visible as a dropdown for admin (showing all site users)

By: Nicola Gammarrota | Asked: 06/08/2025
ForumsCategory: Code SnippetsMake UserID field visible as a dropdown for admin (showing all site users)
Nicola GammarrotaNicola Gammarrota asked 1 week ago

Hi everyone, I’m working on a fairly complex setup using Formidable Forms and need some help with a specific use case. In one of my forms, I’d like to make the UserID field (the one that normally links an entry to the logged-in user):

  • Visible only to administrators (and possibly to other roles later);
  • A dropdown menu that displays all registered users on the site (preferably showing full name, or at least something clearly identifiable);
  • Once selected, this UserID should be treated as if the user had submitted the form themselves, so I can use standard shortcodes like [user_meta key="first_name"] to auto-populate other fields.

  I’m looking for a solution that:

  • Uses native Formidable functionality if possible,
  • Or alternatively, a PHP snippet or documented method to convert the hidden UserID field into a functional dropdown for admins.

    I used this code in the past and it worked. Since June 2024 I realized that it doesn't work anymore:

  • 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;
  • }

  Has anyone solved this or can point me to a clean and reliable solution? Thanks in advance 🙏

1 Answers
Victor Font Staff answered 1 week ago

Here are a couple of options: https://formidableforms.com/knowledgebase/frm_setup_new_fields_vars/#kb-display-user-id-dropdown-on-front-end-for-admin and https://formidableforms.com/knowledgebase/frm_setup_new_fields_vars/#kb-add-user-dropdown

Nicola GammarrotaNicola Gammarrota replied 1 week ago

Unfortunately they don't seem to work.

Rob LeVineRob LeVine Staff replied 1 week ago

I suggest being more specific as to what happens or doesn't happen (including errors) because those solutions have been used frequently to handle the issue you have.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right