It is possible to use custom JavaScript in embedded forms.
Custom JavaScript can be added to a form by using a <script>
tag and adding the cam-script
directive:
<form role="form">
<script cam-script type="text/form-script">
// custom script goes here
</script>
</form>
原文: https://docs.camunda.org/manual/7.9/reference/embedded-forms/javascript/cam-script/