PHPackages                             wpdesk/wp-forms - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. wpdesk/wp-forms

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

wpdesk/wp-forms
===============

WP Forms

3.3.5(8mo ago)028.6k5PHPPHP &gt;=7.4 || ^8CI failing

Since Dec 17Pushed 1mo agoCompare

[ Source](https://github.com/WP-Desk/wp-forms)[ Packagist](https://packagist.org/packages/wpdesk/wp-forms)[ RSS](/packages/wpdesk-wp-forms/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (6)Versions (57)Used By (5)

WP Forms
========

[](#wp-forms)

Reusable form field objects, renderers and persistence helpers for WordPress projects.

`wpdesk/wp-forms` is a Composer package, not a standalone WordPress plugin. It is intended to be used from code that already runs inside WordPress, for example a plugin settings page or another admin form.

Requirements
------------

[](#requirements)

- PHP `>=7.4 || ^8`
- PHP extensions: `ext-curl`, `ext-json`
- Composer packages: `wpdesk/wp-persistence` `^2.0|^3.0`, `wpdesk/wp-view` `^2`
- WordPress runtime for functions used by fields and templates, such as `sanitize_title()`, `sanitize_text_field()`, `sanitize_email()`, `wp_verify_nonce()`, `wp_editor()` and escaping helpers
- WooCommerce runtime only for templates and helpers that use WooCommerce functions, such as `wc_help_tip()`, `wc_get_product()` and the `woocommerce_json_search_products_and_variations` AJAX action

Installation
------------

[](#installation)

Install the package as a runtime dependency:

```
composer require wpdesk/wp-forms
```

When working on this package itself, install development dependencies with:

```
composer install
```

Autoloading
-----------

[](#autoloading)

Load Composer's autoloader in your plugin or application:

```
require_once __DIR__ . '/vendor/autoload.php';
```

The package uses the `WPDesk\Forms\` PSR-4 namespace mapped to `src/`.

Basic Usage
-----------

[](#basic-usage)

Create field objects, pass them to `FormWithFields`, handle data submitted under the form ID and render the form with `SimplePhpRenderer` plus `DefaultFormFieldResolver`.

```
