• Resolved geetha03

    (@geetha03)


    Hi,

    1. I have implemented a custom function to populate a user dropdown dynamically based on user roles in WPForms (Refer Below Code).
      The dropdown works fine on the frontend, but I am facing an issue in the backend when trying to edit an entry.

    When I access the backend edit page via:
    ?page=wpforms-entries&view=edit&entry_id=447
    the user dropdown does not function correctly.

    Why does the user dropdown work on the frontend but not in the backend entry edit view? (Refer Below Code)

    /**

    • USer list Dropdown
      *
      */
      function ea_userlist_dropdown( $field, $form_data ) { if( ‘select’ !== $field[‘type’] )
      return $field;
      $classes = explode( ‘ ‘, $form_data[‘fields’][ $field[‘id’] ][‘css’] );
      if( (! in_array( ‘dynamic-userslist’, $classes ) ))
      return $field;
      $field[‘choices’] = array();
      if(in_array( ‘dynamic-userslist’, $classes ))
      {
      $wp_users_list = get_users( array(
      ‘role__in’ => array( ‘author’,’manager-admissions’,’provc’,’director-crcs’),
      ‘fields’ => array( ‘ID’ , ‘display_name’ , ‘user_login’ )
      ));
      }
      foreach( $wp_users_list as $wp_user_list )
      {
      $display_name_choices = $wp_user_list->display_name . ” – ” .$wp_user_list->user_login;
      $field[‘choices’][] = array( ‘label’ => $display_name_choices, ‘value’ => $wp_user_list->ID , ‘image’ => ” , ‘icon’ => ‘face-smile’ , ‘icon_style’ => ‘regular’);
      }
      return $field;
      }
      add_filter( ‘wpforms_field_data’, ‘ea_userlist_dropdown’, 20, 2 );

    1. Role-Based Access to Entries:

    How can we configure a “Head” role to view and edit all entries while restricting others to their own submissions?

    3.Frontend Entry Editing:

    Is there a shortcode or built-in way to edit WPForms entries from the frontend instead of using the backend?
    Any guidance on these issues would be greatly appreciated.

    Thanks,

Viewing 1 replies (of 1 total)
  • Plugin Support Amjad Ali

    (@amjadali688)

    Hi @geetha03 ,

    We’d be happy to help!

    It seems that you are using the paid version of WPForms. If you have an active license subscription with us, could you please submit a support ticket through the WPForms account dashboard when you have a chance? 

    From there, our support team will be able to take a closer look at your request. 

    Thanks!

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.