Follow-up to #2859002: Pass custom settings to international telephone behavior
Problem/Motivation
Most JS elements allows for a variety of options/settings that are not exposed via the UI, because it can be very difficult to support every possible option/settings.
Proposed resolution
Make sure that all JS element options can be easily overridden.
All JS element options will be moved into a Drupal.webform.ELEMENT_TYPE.options namespace which can be overridden using the JS global or form specific injector.
Drupal.webform = Drupal.webform || {};
Drupal.webform.ELEMENT_TYPE = Drupal.webform.ELEMENT_TYPE || {};
Drupal.webform.ELEMENT_TYPE.options = Drupal.webform.ELEMENT_TYPE.options || {
'SETTING': VALUE
};
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | allow_element_js-2859943-3.patch | 14.69 KB | jrockowitz |
Comments
Comment #3
jrockowitz commentedComment #5
jrockowitz commentedI committed the patch, please download the latest dev release to review.