So yeah, very stupid question, but how would I show a process variable in an embeded form?
I know how to set it it but cant figure out how to show it.
In the first task I set the variable as folows:
<*label for=“tweetContent”>Tweet
<*input cam-variable-name=“content” cam-variable-type=“String” class=“form-control” required="" />
(without the * ofcourse)
And it works, since I am able to see the variable in the cockpit.
Now how would I go about showing it in the next form?
If you have an input with the cam-variable-name and cam-variable-type attribute set, the Tasklist automatically fetches the process variable, if it exists. So in the next form, you can have the same input field you used to set the variable, to retrieve, display, and possible change it. Of course you can also set the input field to readonly or disabled.
If you would rather use Javascript to load the process variable, you can hook into the form lifecycle to load additional process variables.
When two embedded forms have the same variables with cam-variable-name and cam-variable-type set and the previous form fills in the required data. The following form should be able to display the data which were provided by the previous one?
Is the Javascript (please see Ingos response) necessary?
Your assumption is correct. You need Javascript only if you do not want to use an input field with the cam-variable-name and cam-variable-type attributes.
Unfortunately, me i don’t see and i can’t fetch my checkbox variable in the next form …
In fact i display my checkbox from a process variable ==> The html code is stocked in a process variable which i display via innerHtml function of Document.