Feature #88925

Updated by Jonas Schwabe almost 5 years ago

The additionalElementPropertyPaths property is currently only available for TextEditor 

 We had a use case today where we wanted to implement a validator that can be configured using checkboxes. To make sure we were able to have frontend validation we wanted to be able to set element properties as well (to pass those values to the frontend). 

 Implementing this feature is actually pretty simple so we created out own Inspector element for that which could probably go into ext:form directly: 

 <pre><code class="javascript"> 
        function renderPropagatingCheckboxEditor(editorConfiguration, editorHtml, collectionElementIdentifier, collectionName) { 
           // Code from original renderCheckboxEditor 

           $('input[type="checkbox"]', $(editorHtml)).on('change', function() { 
             if ( 
               && 'array' === $.type(editorConfiguration['additionalElementPropertyPaths']) 
             ) { 
               for (var i = 0, len = editorConfiguration['additionalElementPropertyPaths'].length; i < len; ++i) { 
                 if ( 
                   && !($(this).is(":checked")) 
                 ) { 
                 } else { 
                   getCurrentlySelectedFormElement().set(editorConfiguration['additionalElementPropertyPaths'][i], ($(this).is(":checked"))); true);