Permalink
Browse files

The data is not in the DOM is in SUGAR global variable

  • Loading branch information...
Abuelodelanada committed Dec 20, 2018
1 parent b37e417 commit 528ae420dd9be6d798c47cf20873ec22c1c8e1a7
Showing with 2 additions and 2 deletions.
  1. +2 −2 content/developer/Vardefs.adoc
@@ -333,7 +333,7 @@ $dictionary["TheModule"]["fields"]["some_field"]['type'] = 'int';

== Frontend

When developing some complex JavaScript functionality is very useful to have module vardefs definitions or custom data in the DOM so you can read it from JavaScript.
When developing some complex JavaScript functionality is very useful to have module vardefs definitions or custom data in the SUGAR global variable so you can read it from JavaScript.

Adding vardefs.php definitions to a specific view is very simple:

@@ -358,7 +358,7 @@ After that, you can access vardefs definitions from JavaScript easily
image:vardefs.png[title="Accounts vardefs in SUGAR global"]


But we can also add other relevant information to the DOM, like for example developer's data ;-)
But we can also add other relevant information to the SUGAR global variable, like for example developer's data ;-)



0 comments on commit 528ae42

Please sign in to comment.