### [How to Customize Available Date Ranges for the WPForms Dashboard Widget](https://wpforms.com/developers/how-to-customize-available-date-ranges-for-the-wpforms-dashboard-widget/)

**Published:** January 30, 2020
**Author:** Editorial Team

**Excerpt:** In this tutorial, we'll show you how to customize date ranges for the dashboard widget that WPForms provides to show entry counts for all of your forms. 

**Content:**

## Introduction

Would you like to customize date ranges for the WPForms Dashboard Widget? Using a small PHP snippet you can easily add as many different date ranges as you’d like. In this tutorial, we’re going to walk you through how to customize these date ranges so that you can get exactly what you need for your easy view reporting.

By default, the widget will allow you to choose a **7** or **30** date range for your form entry counts.

![The WPForms dashboard widget by default will only show you the last 7 and 30 day time spans](https://wpforms.com/wp-content/uploads/2019/10/wpf-dashboard-widget.jpg)

To learn more about the WPForms Dashboard Widget, [check out this documentation](https://wpforms.com/docs/how-to-use-the-wpforms-dashboard-widget/ "How to Use the WPForms Dashboard Widget").

## Adding the snippet

For the purpose of this tutorial, we want to add an additional date range of the last **90** days. In order to do this, you’ll need to add this snippet to your site.

If you need any assistance in how to add snippets to your site, [please review this tutorial.](https://wpforms.com/developers/how-to-add-custom-php-or-javascript-for-wpforms/ "How to Add Custom PHP or JavaScript for WPForms")

```

/**
 * Customize the dashboard date range to show the last 90 days entry count
 *
 * @link https://wpforms.com/developers/how-to-add-an-additional-time-span-to-the-dashboard-widget/
 */

function wpf_dev_dash_widget_timespan_options( $options ) {

    $options[] = 90;

    return $options;

}

add_filter( 'wpforms_dash_widget_timespan_options', 'wpf_dev_dash_widget_timespan_options', 10, 1 );
```

## Viewing the changes

Click **Dashboard** from the WordPress admin menu on the left and now you’ll see you have a new option in the dropdown of **90 days** in the **Total Entries by Form** dropdown.

![Now you can easily customize date ranges with this small snippet](https://wpforms.com/wp-content/uploads/2019/10/wpforms-time-span-dashboard-widget.jpg)

And that is all you need to customize the date ranges available inside the WPForms Dashboard Widget! You’ve now successfully increased your dashboard widget time span to include a new 90 days range. If you’re not already familiar with the **Entries** screen, we recommend you take a look at this article for a [complete guide to WPForms entries.](https://wpforms.com/docs/complete-guide-to-form-entries/ "A Complete Guide to Form Entries").

## Related

Filter Reference: [wpforms\_dash\_widget\_timespan\_options](https://wpforms.com/developers/wpforms_dash_widget_timespan_options/ "Using the wpforms_dash_widget_timespan_options filter")

## FAQ

#### Q: Can I add more ranges?

**A:** Absolutely! Here’s an example of including a **60** day range as well as the **90** day range.

```

/**
 * Adding 60 and 90 day range to the dashboard widget time span.
 *
 * @link https://wpforms.com/developers/how-to-add-an-additional-time-span-to-the-dashboard-widget/
 */

function wpf_dev_dash_widget_timespan_options( $options ) {

    $options[] = 60;
    $options[] = 90;

    return $options;

}

add_filter( 'wpforms_dash_widget_timespan_options', 'wpf_dev_dash_widget_timespan_options', 30, 1 );
```

#### Q: Will this also change the Entries screen?

**A:** No, this filter will only change the dashboard widget on the main WordPress **Dashboard** screen.

**Categories:** Tutorials

---

