Changes for page Grundeigenschaften


From version 7.1
edited by nlo
on 23.07.2021, 11:48
Change comment: There is no comment for this version
To version 7.2
edited by awa
on 28.07.2021, 08:54
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.nlo
1 +XWiki.awa
Content
... ... @@ -48,3 +48,7 @@
48 48  * for elements on the property "Options"
49 49  
50 50  If a reference is found in the selected areas, it will be updated with the new name.
51 +
52 +You need to pay special attention to JavaScript code. Common ways of referencing a form element are taken care of. The name in usual selectors such as //$('[name="tfEmail"]')// is replaced with the new name. However, uncommon selectors such as //document.getElementByName("tfEmail")// are not replaced.
53 +
54 +Moreover, please note that it is not possible, even in principle, to replace all references in a complex programming language such as JavaScript. For example, the name may be be taken from a variable, from a computation or from an external data source: //["EMail", "Vorname", "Nachname"].forEach(name => $(`[name="tf${name}"]`).clear())//. Such cases require you to adjust the JavaScript manually. If you have forms with complex JavaScript code, you should always evaluate the effects of renaming a form element beforehand.