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
};
CommentFileSizeAuthor
#3 allow_element_js-2859943-3.patch14.69 KBjrockowitz

Comments

jrockowitz created an issue. See original summary.

  • jrockowitz committed b2a27e8 on 2859943-js-options
    Issue #2859943: Allow element JS options to be overridden
    
jrockowitz’s picture

Status: Active » Needs review
StatusFileSize
new14.69 KB

  • jrockowitz committed 00db987 on 8.x-5.x
    Issue #2859943 by jrockowitz: Allow element JS options to be overridden
    
jrockowitz’s picture

Status: Needs review » Fixed

I committed the patch, please download the latest dev release to review.

  • jrockowitz committed 7429343 on 8.x-5.x
    Issue #2859943: Allow element JS options to be overridden
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.