automattic / jetpack-forms
Jetpack Forms
Installs: 6 385
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Type:jetpack-library
Requires
- php: >=7.2
- automattic/jetpack-assets: ^3.0.0
- automattic/jetpack-blocks: ^3.0.0
- automattic/jetpack-connection: ^6.0.1
- automattic/jetpack-logo: ^3.0.0
- automattic/jetpack-status: ^5.0.0
- automattic/jetpack-sync: ^4.0.0
Requires (Dev)
- automattic/jetpack-changelogger: ^5.0.0
- automattic/jetpack-connection: ^6.0.1
- automattic/wordbless: ^0.4.1
- yoast/phpunit-polyfills: ^1.1.1
Suggests
- automattic/jetpack-autoloader: Allow for better interoperability with other plugins that use this package.
- dev-trunk / 0.34.x-dev
- v0.34.0
- v0.33.8
- v0.33.7
- v0.33.6
- v0.33.5
- v0.33.4
- v0.33.3
- v0.33.2
- v0.33.1
- v0.33.0
- v0.32.16
- v0.32.15
- v0.32.14
- v0.32.13.1
- v0.32.13
- v0.32.12
- v0.32.11
- v0.32.10
- v0.32.9
- v0.32.8
- v0.32.7
- v0.32.6
- v0.32.5
- v0.32.4
- v0.32.3
- v0.32.2
- v0.32.1
- v0.32.0
- v0.31.4
- v0.31.3
- v0.31.2
- v0.31.1
- v0.31.0
- v0.30.18
- v0.30.17
- v0.30.16
- v0.30.15
- v0.30.14
- v0.30.13
- v0.30.12
- v0.30.11
- v0.30.10
- v0.30.9
- v0.30.8
- v0.30.7
- v0.30.6
- v0.30.5
- v0.30.4
- v0.30.3
- v0.30.2
- v0.30.1
- v0.30.0
- v0.29.2
- v0.29.1
- v0.29.0
- v0.28.0
- v0.27.0
- v0.26.0
- v0.25.0
- v0.24.2
- v0.24.1
- v0.24.0
- v0.23.1
- v0.23.0
- v0.22.6
- v0.22.5
- v0.22.4
- v0.22.3
- v0.22.2
- v0.22.1
- v0.22.0
- v0.21.0
- v0.20.1
- v0.20.0
- v0.19.11
- v0.19.10
- v0.19.9
- v0.19.8
- v0.19.7
- v0.19.6
- v0.19.5
- v0.19.4
- v0.19.3
- v0.19.2
- v0.19.1
- v0.19.0
- v0.18.0
- v0.17.0
- v0.16.0
- v0.15.0
- v0.14.1
- v0.14.0
- v0.13.0
- v0.12.0
- v0.11.0
- v0.10.2
- v0.10.1
- v0.10.0
- v0.9.0
- v0.8.0
- v0.7.0
- v0.6.0.2
- v0.6.0.1
- v0.6.0
- v0.5.1
- v0.5.0
- v0.4.0
- v0.3.0
- v0.2.1
- v0.2.0
- v0.1.0
- dev-release-v0.10.2
- dev-release-v0.6.0.2
- dev-release-v0.6.0.1
- dev-release-v0.2.1
This package is auto-updated.
Last update: 2024-11-21 19:40:41 UTC
README
All things forms. This package currently contains the implementation for Jetpack's Contact Form module, Form blocks, and the new Jetpack Forms feedback dashboard.
Hierarchy
.
├── src/
│ ├── blocks/ - Form blocks.
│ ├── contact-form/ - Contact form module implementation.
│ ├── dashboard/ - Implementation for the new forms dashboard.
│ ├── service/ - Helpers for 3rd-party service integrations.
│ ├── class-jetpack-forms.php - Package entrypoint.
│ └── class-wpcom-rest-api-v2-endpoint-forms.php - WP.com REST API endpoints definition.
│
└── tools/ - Webpack configuration for all bundles in the package.
See the individual subdirectories for more information.
API Endpoints
This package adds the following WP.com REST API endpoints:
GET /forms/responses
Returns a list of contact form responses.
Supported params:
parent_id
: (int) Filter responses by parent post ID.limit
: (int) Limit the number of returned responses.month
: (string) Filter responses by month. Format:YYYYMM
offset
: (int) Offset the returned responses.search
: (string) Search for responses where any field includes the given string.status
: (string) Filter responses by status. Supported values:inbox
,spam
,trash
.
Response:
{ "filters_available": { "month": [ { "month": 1, "year": 2023 }, { "month": 3, "year": 2023 }, ], "source": [ { "id": 55, "title": "Contact Page", "url": "https://jetpackme.wordpress.com/contact-support", } ], }, "responses": [ { "id": 123, "entry_permalink": "https://jetpackme.wordpress.com/contact-support", "entry_title": "Contact Page", "ip": "127.0.0.1", "date": "2023-01-05T00:00:00", "fields": { "1_Name": "John Smith", "2_Email": "john.smith@foo.bar", "3_Message": "Help!", }, }, { "id": 213, "entry_permalink": "https://jetpackme.wordpress.com/contact-support", "entry_title": "Contact Page", "ip": "127.0.0.1", "date": "2023-03-20T05:23:00", "fields": { "1_Name": "John Smith", "2_Email": "john.smith@foo.bar", "3_Message": "Lorem Ipsum", }, }, ], "totals": { "inbox": 2, "spam": 0, "trash": 1, }, }
POST /forms/responses/bulk_actions
Performs bulk actions on a list of response IDs.
Supported params:
action
: (string) The action to perform. Supported values:mark_as_spam
,mark_as_not_spam
,trash
,untrash
,delete
(permamently removes the response).post_ids
: (int[]) The list of response IDs to perform the action on.
Response:
{}
Using this package in your WordPress plugin
If you plan on using this package in your WordPress plugin, we would recommend that you use Jetpack Autoloader as your autoloader. This will allow for maximum interoperability with other plugins that use this package as well.
Security
Need to report a security vulnerability? Go to https://automattic.com/security/ or directly to our security bug bounty site https://hackerone.com/automattic.
License
forms is licensed under GNU General Public License v2 (or later)