wet-boew wb-frmvld form validation on specified fields

Created on 15 December 2022, almost 2 years ago
Updated 25 January 2023, almost 2 years ago

Problem/Motivation

When a form is wrapped in

<div class="custom-wrapper wb-frmvld">'
</div>

This wrapped div when around a form that uses the wet-boew library, enables wet-boew form validation. This wet-boew form validation adds some interesting accessibility however it breaks features like webform conditionals provided by the Webform module designed for Drupal 9 or Drupal 10.

Additional context

Steps to reproduce

  1. Create a new web form with the state-of-the-art wxt distribution.
  2. Put a prefix: '#prefix': '<div class="custom-wrapper wb-frmvld">'
  3. Put a suffix: '#suffix': '</div>'
  4. Adds conditions for a field, say a field's visibility depends on another field's options.
  5. Visit the web interface of the created form
  6. No conditions will work
  7. Remove suffix/prefix
  8. Test again, all conditions will work as designed.

Proposed resolution

the build and compile instructions for wet-boew are here:

https://wet-boew.github.io/v4.0-ci/docs/start-en.html

I haven't tested these build/compile instructions yet but it's a good starting point.
See upstream issue:
https://github.com/wet-boew/wet-boew/issues/9498

Remaining tasks

Set up a wet-boew development build,
the build and compile instructions for wet-boew are here:

https://wet-boew.github.io/v4.0-ci/docs/start-en.html

Debug the functionality related to wb-frmvld (wet-boew form validation), pay attention particularly to any javascript that removes events, add event bindings/namespaces use namespaces for wet-boew that don't conflict with others, change the logic to remove the namespaced wet-boew events and regenerate the events using wet-boew namespaced events, do not remove existing events, examine if the DOM changes are breaking webform conditionals, debug and fix the problem

User interface changes

N/A

API changes

TBD

🐛 Bug report
Status

Active

Version

4.4

Component

WxT Library

Created by

🇨🇦Canada joseph.olstad

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇨🇦Canada jamesyao

    wb-frmvlid of the wet-boew removes the events (change & state:checked) and events (change & state:value & keyup) from the field check and radio type in Webform, respectively.

    It breaks the conditional functionality of Webform.

  • 🇨🇦Canada joseph.olstad

    @jamesyao, thanks for this bit of information, could help lead us to a fix. I will update the upstream issue

Production build 0.71.5 2024