Webform

The Lupus Decoupled Webform module provides support for Webform module (version 6.0 or later), a popular module for building forms using the UI.

Webform integration utilizes the Lupus Decoupled Forms functionality (see How it work? section), thus webforms get a custom elements API endpoint.

Limitations

Drupal JavasScript are currently not provided by the webform API response, thus any webform elements relying on JavaScript are missing the Drupal JavaScript.

Confirmation types

Inline and page (default) confirmations are supported, but for page confirmation type the user (or anonymous) needs to have access to "view own webform submissions" set on the webform settings tab configured at admin/structure/webform/manage/{webform}/access

Submission example

A curl request example to submit a custom webform (with test_ce_webform id). Note that the submission webform id is webform_submission_test_ce_webform_add_form.

curl -k -X POST --url https://lupus-decoupled.ddev.site/ce-api/form/test_ce_webform -F 'first_name=John' -F "last_name=Doe" -F "checkbox=1" -F "op=Submit" -F "form_build_id=form-<form-build-id>" -F "form_id=webform_submission_test_ce_webform_add_form" -H "Accept: application/json"