I want to use the Json value fetched in embedded forms in JavaScript in the same form created

Here I am not able to fetch
document.getElementById(“deptt”).innerText this value.
after doing console.log it is showing {{joinee.department}}

Please help
@aravindhrs
@jjarndt

Hello @mahavir ,

I see that you are mixing up native DOM-browsing with angularjs.
I would try to stick to the events provided by the embedded form itself.

https://docs.camunda.org/manual/7.15/reference/forms/embedded-forms/javascript/

Here, you could handle the dynamic content of the form by using the function executed on “variables-fetched” or maybe even use the angular directive.

AngularJS

Some keywords that might be helpful is “ng-if”, which can hold an expression that - if true - the element and all containing elements are rendered.

The great advantage is, that you can here access the actual data in $scope.joinee instead of fetching them inside your DOM.

2 Likes

Thanks for your reply
This solution worked for me
@jonathan.lukas

1 Like