# Save WPForms Lite Entries in the Admin

> Keeps a copy of every WPForms Lite submission in a private "Form Entries" list in the admin, since the free version does not store entries.

- Type: PHP
- Runs: Run everywhere
- Category: [Forms](https://wpide.com/library/category/forms/)
- Tags: wpforms, entries, storage
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/wpforms-save-entries-lite/

## Code

```php
add_action( 'init', function () {
    register_post_type( 'wpide_wpf_entry', array(
        'labels'          => array( 'name' => 'Form Entries', 'singular_name' => 'Form Entry', 'menu_name' => 'Form Entries' ),
        'public'          => false,
        'show_ui'         => true,
        'show_in_menu'    => true,
        'menu_icon'       => 'dashicons-feedback',
        'supports'        => array( 'title', 'editor' ),
        'capabilities'    => array( 'create_posts' => 'do_not_allow' ),
        'map_meta_cap'    => true,
    ) );
} );

add_action( 'wpforms_process_complete', function ( $fields, $entry, $form_data ) {
    $rows = array();
    foreach ( (array) $fields as $field ) {
        $rows[] = '<strong>' . esc_html( isset( $field['name'] ) ? $field['name'] : '' ) . ':</strong> ' . nl2br( esc_html( isset( $field['value'] ) ? (string) $field['value'] : '' ) );
    }

    $title = isset( $form_data['settings']['form_title'] ) ? $form_data['settings']['form_title'] : 'Form';

    wp_insert_post( array(
        'post_type'    => 'wpide_wpf_entry',
        'post_status'  => 'private',
        'post_title'   => sprintf( '%s – %s', $title, wp_date( 'Y-m-d H:i' ) ),
        'post_content' => wp_kses_post( implode( "<br>\n", $rows ) ),
        'meta_input'   => array( '_wpide_wpf_form_id' => (int) $form_data['id'] ),
    ) );
}, 10, 3 );
```

## Notes

Entries are private posts visible to administrators only; WPForms Pro already stores entries, so skip this snippet there.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Save WPForms Lite Entries in the Admin" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
