Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @rsdkd,

    Sorry for the delayed response.
    For the checkbox field data to appear there, you will need to replace the line

    $val = get_user_meta( $user_id, 'user_registration_country_1543398649', true );
           return isset( $val ) ? $val : '';

    with the line

    $val = get_user_meta( $user_id, 'user_registration_check_box_1594575751', true );
           return isset( $val ) ? $val : '';

    and it will work.

    NOTE: Make sure that you use the exact field name of the checkbox whose data you want to show. You can find the field name of the checkbox by clicking on the checkbox field in the form builder. See screenshot: https://prnt.sc/tgf7ty
    The check_box_1594575751 data is the filename of my checkbox field. Yours would be different.

    Let me know if it helps or not and I will get back to you.
    Regards!

    Thread Starter rsdkd

    (@rsdkd)

    Thanks for your reply.

    But it still does not work, the row is there in the User overview, but no Info inside. Does not matter if the checkbox was checked or not – the row stays empty.

    I added this code:

    /**
    * Add the column header
    *
    * @param array $columns
    *
    * @return array
    */
    function ur_add_column_head( $columns ) {
        if ( ! current_user_can( 'edit_user' ) ) {
         return $columns;
        }
    
      $columns['ur_extra'] = __( 'Werbung', 'user-registration' );
      return $columns;
    }
    
    /**
    * Set the Column value for each user in the users list
    *
    * @param string $val
    * @param string $column_name
    * @param int $user_id
    *
    * @return string
    */
    function ur_add_column_cell( $val, $column_name, $user_id ) {
    
         if ( ! current_user_can( 'edit_user' ) ) {
            return false;
         }
    
        $val = '';
        if ( $column_name == 'ur_extra') {
    		$val = get_user_meta( $user_id, 'check_box_1592818500818', true );
           return isset( $val ) ? $val : '';
        }
       return $val;
    }

    And this is the checkbox field name: check_box_1592818500818

    I think thats all correct? But still no Info in the Admin overview.

    Thread Starter rsdkd

    (@rsdkd)

    Can you please give me another hint?

    Thank you : )

    Hi @rsdkd,

    I think the value is not being returned so it appears to be blank. Can you please raise a ticket here: https://wpeverest.com/contact/
    Please include the link to this support thread too and someone from the development team will get back to you.

    Regards!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Extra information in admin overview’ is closed to new replies.