Hi
I have a few questions around Task Forms. I am wanting to achieve the following:
- Have dynamic TaskForms displayed to users. For example a screen with an EntityType select would display completely different options on the UI when onchange is fired.
1) Looking at the docs between version 7.1 and 7.2 the whole section on "Extending the Task Form Scope with Custom Behavior" has been removed... is there a reason for this? What's the recommended way forward for setting up custom behavior within forms?
2) Is it possible to use a combination of the embedded and generated forms in some way? ie: I'd like as a developer to be able to use the properties type within eclipse to configure validation setup for fields within a form. However I also need to ensure that its possible to have dynamic forms?
3) Following the example at [1] I'm unable to get the ng-if="variablesForm.loanType.$invalid" to work what's the trick with this? Code within my embedded for currently is as follows (not that neither the green/red paragraph sections ever display):
{<form role="form" name="form">
<div class="form-group">
<label for="empId-field">Emp ID</label>
<input required name="empId" cam-variable-name="empId" cam-variable-type="String" class="form-control" ng-pattern="/\d{2}-\d{2}/" />
<!-- Custom validation message for select box -->
<p ng-if="variablesForm.empId.$invalid" style="color: red">Please select a empId type.</p>
<p ng-if="variablesForm.empId.$valid" style="color: green">empId type is correct.</p>
</div>
<div class="form-group">
<label for="amount-field">Amount</label>
<input cam-variable-name="amount" cam-variable-type="Float" class="form-control" />
</div>
</form>}
4) is it possible to externalize (to a separate js file) the {<script form-script type="text/form-script">} sections? I want to ensure a separation of the HTML and Javascript
5) In the current modeler when you add form fields .. there is a properties section. When adding properties in the XML you get {<camunda:properties>
<camunda:property id="dfg" value="dfg"/>
</camunda:properties>} what is this for and how is it used?
6) Is there a way to have strings for labels/validation errors coming from a properties file. (for ease of changing and/or translations?)