- Issue created by @jrockowitz
- Merge request !577Issue #3493832: Allow custom data-options to added to elements JavaScript options → (Closed) created by jrockowitz
- First commit to issue fork.
- 🇨🇦Canada colan Toronto 🇨🇦
Resolved merge conflict. Problem was that we're hacking on the file
modules/webform_toggles/js/webform_toggles.element.js
that's no longer there due to 📌 Deprecate the use of drgullin/icheck Active . I simply removed the file. If folks are interested in making this change in Webform Deprecated → , they can dig it out of the commit. - 🇨🇦Canada colan Toronto 🇨🇦
Here's a Composer-friendly patch for 6.2.x, which assumes that #3452986-18: Update jquery.intl-tel-input to v23.0.10 and add option for i18n → has already been applied.
- 🇺🇸United States jrockowitz Brooklyn, NY
People should weigh-in if this enhancement is useful.
- 🇺🇸United States luke.leber Pennsylvania
I think the concept is useful, but sometimes the customization can't be hard-coded as data attributes, but rather rely on runtime information.
One example is for the international telephone element. See https://git.drupalcode.org/project/webform_intl_tel_national_mode/-/blob... for a somewhat heavy handed fix for how most UX problems were resolved.
Were there a client side event to tap into, it'd make things a lot easier to tweak. I would LOVE to take a holistic pass on the telephone input given how many quirks there are, and if there was more robust options handling, that'd be even easier.
- Status changed to RTBC
about 2 months ago 4:13pm 23 August 2025 - 🇺🇸United States jrockowitz Brooklyn, NY
Were there a client side event to tap into, it'd make things a lot easier to tweak.
I would be very open to adding a simple alter options event below all instances of
// Allow custom options. if ($select.attr('data-options')) { options = $.extend(JSON.parse($input.attr('data-options')), options); }
I am not sure of the right syntax, maybe this could be a later enhancement.
I am leaning toward merging this AS-IS.
- b085c3af committed on 6.3.x
Issue #3493832: Allow custom data-options to added to elements...
- b085c3af committed on 6.3.x
- 🇺🇸United States jrockowitz Brooklyn, NY
I couldn't merge the MR so I applied the patch without any problems
- b085c3af committed on 6.x
Issue #3493832: Allow custom data-options to added to elements...
- b085c3af committed on 6.x