📌 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.
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.
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.
Active
1.0
Code