Closed (fixed)
Project:
Webform
Version:
6.3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Sep 2025 at 12:56 UTC
Updated:
1 Oct 2025 at 13:29 UTC
Jump to comment: Most recent
The data-options introduced by #3493832: Allow custom data-options to be added to elements JavaScript options isn't working properly.
It allows adding new attributes, but not overriding existing ones.
Enhance support for international phone numbers.Advanced tab and add the following to Element custom attributes (YAML):data-options:
hiddenInput: '{"nationalMode": "true"}'
By default, the nationalMode is false and adding this data-options doesn't override the settings.
Instead of options = $.extend(JSON.parse($telephone.attr('data-options')), options); change it to:
options = $.extend(true, options, JSON.parse($telephone.attr('data-options')));
It will also allow the two objects to be merged.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
jrockowitz commentedThat seems reasonable. Please create an MR.
Comment #4
hfernandes commentedMR created for review.
Comment #5
jrockowitz commentedLooks good. Failing test is unrelated
Comment #8
hfernandes commentedThanks for the quick turnaround.