Field data (email) not showing on admin columns

Support MB Admin Columns Field data (email) not showing on admin columns

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #13534
    lighterdayzlighterdayz
    Participant

    On a custom post type, I need to show all custom fields in the admin columns. I can't figure out how to get the data to show in the "email" column.

    Also, is there a way to prevent repeat submissions based on email address?

    Thanks in advance!
    Marge

    Screen grab

    add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' );
    function your_prefix_register_meta_boxes( $meta_boxes ) {
        $meta_boxes[] = array (
            'title' => 'Turn Off Pledge',
            'id' => 'turn-off-pledge',
            'post_types' => array(
                0 => 'turn-off',
            ),
            'context' => 'normal',
            'priority' => 'high',
            'fields' => array(
                array (
                    'id' => 'Name',
                    'type' => 'text',
                    'name' => 'Name',
                    'admin_columns' => 'before title',
                ),
                array (
                    'id' => 'to-email',
                    'name' => 'Email',
                    'type' => 'email',
                    'required' => 1,
                    'admin_columns' => 'replace title',
                ),
                array (
                    'id' => 'your_profession',
                    'type' => 'taxonomy',
                    'name' => 'Profession',
                    'taxonomy' => 'profession',
                    'field_type' => 'checkbox_list',
                    'admin_columns' => 'before date',
                ),
            ),
        );
        return $meta_boxes;
    }
    #13536
    lighterdayzlighterdayz
    Participant

    Well, the field started showing...not sure why, but the two first tests are still not showing. So, should be fine!

    But question #2 about repeat submissions would be great.

    Thanks!
    Marge

    #13610
    Anh TranAnh Tran
    Keymaster

    Hi Marge,

    Also, is there a way to prevent repeat submissions based on email address?

    Do you mean if user submit a post that has an existing email in a custom field, then stop saving the post? As far as I know, there's no way to stop WordPress from creating a post (unless you use die).

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.