Progressive handling of form submissions

Created on 7 May 2023, about 1 year ago

Motivation

πŸ“Œ Add support for forms Needs review provides support for Drupal forms, which can be submitted via JavaScript. While this works nicely when JavaScript is available, it would be desirable to have form-submissions work without JavaScript also. That makes the application more robust and keep things working in case of devices without JavaScript or broken JavaScript and allows for further optimizations of removing client-side scripts when not required.

Problem

When submitting forms from the browser to Drupal, form validation or reloads must be rendered by the frontend. For that to work form submissions must go via a frontend server which is able to handle render pages in that situation.

Proposed resolution

  • Implement a form component, which handles form submissions. Form action should be the route which shows the form.
  • Have some server middleware that proxies incoming form submission to the drupal server, again to the route where drupal shows and processes the form.
  • Nuxt server middleware handles the response, redirects are directly applied. When Drupal returns an updated page, update page state and make sure the wildcard-route renders it instead of requesting a fresh page.
πŸ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¦πŸ‡ΉAustria fago Vienna

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024