Good afternoon community!
I developed a widget in Bonita 7.5.4 community version but when assigning the value to the BDM variable it seems empty.
That is, in the value property I have formInput.solicitudInput.Site but when I send it to call in another form it appears empty, check the json at the time of creating the case and from there it goes empty.
My question is if they know how to connect or how can I send the value of a custom widget?
Then I leave the widget code.
Template
<!doctype html>
<html>
<body>
<div ng-class="{
'form-horizontal': properties.labelPosition === 'left' && !properties.labelHidden,
'row': properties.labelPosition === 'top' && !properties.labelHidden || properties.labelHidden
}">
<div class="form-group">
<label
ng-if="!properties.labelHidden"
ng-class="{ 'control-label--required': properties.required }"
class="control-label col-xs-{{ !properties.labelHidden && properties.labelPosition === 'left' ? properties.labelWidth : 12 }}">
{{ properties.label | uiTranslate }}
</label>
<div class="col-xs-{{ 12 - (!properties.labelHidden && properties.labelPosition === 'left' ? properties.labelWidth : 0) }}" >
<select class="form-control" ng-model="selectedTypeName" ng-options="option.type as option.text for option in properties.typeNames">
<option style="display:none" value="">
</option>
</select>
<select class="form-control" ng-model="selectedName" ng-options="item.id as item.text for item in properties.filterValues|filter:{type:selectedTypeName}">
<option style="display:none" value="">
</option>
</select>
</div>
</div>
</div>
</body>
</html>Controller
function($scope){
function selectOptions(name,optionIndex)
{
var changeEvent = new Event('change', { bubbles: true});
var inputByName = document.getElementsByClassName(name);
productInput = inputByName[2];
productInput.selectedIndex = optionIndex;
productInput.dispatchEvent(changeEvent);
}
selectOptions('form-control',1);
}
It is a select that filters data based on the first selection,
Does anyone know how I can get the selected value from that select?