I have a custom entity called Projects and it has an administrative section on the form. My plan was to use a field I created on the Contacts object called "Group" to use JavaScript to hide/show the administrative section on my Projects form. The form is opened from an entity list and can be read-only or edited and I have the buttons setup on the entity list for this.
My first attempt was to create a hidden input with the "Group" value on the current contact populated using liquid. Then I planned on using custom JavaScript on the form to check that hidden input and hide/show the administrative section properly on the edit form. This doesn't work because the form's JavaScript seems to be encapsulated so that it can only work inside the form and not on the page as a whole. Attempts to retrieve the hidden input by ID result in a null reference with vanilla JavaScript and a length of 0 with JQuery.
It would be nice if I could inject liquid into the form, but I can find no way to do that. Is there any other way of sharing this data to the form?