Drupal is a registered trademark of Dries Buytaert
Release: Drupal 10.3.6 Update released for Drupal core (10.3.6)! Release: Drupal 11.0.5 Update released for Drupal core (11.0.5)! Release: Drupal 10.2.9 Update released for Drupal core (10.2.9)! Release: Drupal 10.2.10 Update released for Drupal core (10.2.10)! Release: Drupal 10.3.7 Update released for Drupal core (10.3.7)! Release: Drupal 11.0.6 Update released for Drupal core (11.0.6)! Release: Drupal 10.3.8 Update released for Drupal core (10.3.8)! Release: Drupal 11.0.7 Update released for Drupal core (11.0.7)! Module Revived: Translation Management Tool 8.x-1.19 Module tmgmt updated after 7 months of inactivity (8.x-1.19). Usage Milestone: Account field split Module account_field_split crossed 10,000 active installs.

Overview

Retrieve and submit webforms via REST.

  1. Enable module
  2. Enable REST resource "Webform Submit"
  3. Enable REST resource "Webform Elements"
  4. Enable REST resource "Webform Submission"

There may be 2 Webform Submission resources. The one provided by this module has the path: /webform_rest/{webform_id}/submission/{sid}

Submit Webform

POST /webform_rest/submit

Example POST data:

{
  "webform_id": "my_webform",
  "checkboxes_field": [
    "Option 3",
    "Option 5"
   ],
   "integer_field": 3,
   "radio_field": "Mail",
   "email": "[email protected]"
}

Update Webform Submission

PATCH /webform_rest/{webform_id}/submission/{sid}?_format=json

Example PATCH data:

{
  "checkboxes_field": [
    "Option 3",
    "Option 5"
   ],
   "integer_field": 3,
   "radio_field": "Mail",
   "email": "[email protected]"
}

Retrieve Webform Elements

Returns all form elements including render array.

GET /webform_rest/{webform_id}/elements?_format=json

Retrieve Webform Fields

Returns form fields.

GET /webform_rest/{webform_id}/fields?_format=json

Retrieve Webform Submission

GET /webform_rest/{webform_id}/submission/{sid}?_format=json

Example response:

{
  "entity": {
    "serial": [
      {
        "value": 1
      }
    ],
    "sid": [
      {
        "value": 1
      }
    ],
    "uuid": [
      {
        "value": "f796859a-7d65-471a-b794-d6c4ea83ab49"
      }
    ]
  // More entity fields including token, completed, in_draft etc.
  },
  "data": {
    "checkboxes_field": [
      "Option 3",
      "Option 5"
     ],
     "integer_field": 3,
     "radio_field": "Mail",
     "email": "[email protected]"
  }
}

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Jan 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Core Release date
4.2.0 Stable Jan 7, 2025