Issue Feature Resolved

#88925additionalElementPropertyPaths for Inspector-CheckEditor

Jonas Schwabe 08/06/19, 12:04 updated 10/23/26, 04:45

Description

The additionalElementPropertyPaths property is currently only available for TextEditor https://docs.typo3.org/c/typo3/cms-form/master/en-us/I/Config/proto/formElements/formEditor/inspectorEditors/TextEditor.html#additionalelementpropertypaths

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:

       function renderPropagatingCheckboxEditor(editorConfiguration, editorHtml, collectionElementIdentifier, collectionName) {
          // Code from original renderCheckboxEditor

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

Reviews 1

History 25

  1. Georg Ringer commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-10-23T04:45:15+00:00" > 10/23/26, 04:45 </span>

    Applied in changeset commit:1a202858b7be742e445124638768488f7f78736c.