Get the container for the form field in the JavaScript example
authorCyperghost <olaf_schmitz_1@t-online.de>
Wed, 31 Jul 2024 06:55:34 +0000 (08:55 +0200)
committerCyperghost <olaf_schmitz_1@t-online.de>
Wed, 31 Jul 2024 06:55:34 +0000 (08:55 +0200)
docs/php/api/form_builder/form_fields.md

index 73e5c4e7f0f853d1fadeb9a67f6a3a4f208ae49e..6f0c892a9cec53d21bc15f08e400e0c7b62915ab 100644 (file)
@@ -553,7 +553,7 @@ When this button is pressed, the `fileProcessorCustomAction` event is fired, whi
 Example:
 
 ```ts
-document.getElementById('exampleFileID').parentElement.addEventListener('fileProcessorCustomAction', (event) => {
+document.getElementById('exampleFileIDContainer').addEventListener('fileProcessorCustomAction', (event) => {
   // event.detail is the $actionName
 });
 ```