*/
class AutocompleteAction extends AbstractAction {
use Traits\SavedSearchInspectorTrait;
+ use Traits\GetSetValueTrait;
/**
* Autocomplete search input for search mode
*/
protected $key;
+ /**
+ * Known entity values.
+ *
+ * Value will be populated by the form based on data entered at the time.
+ * They can be used by hooks for contextual filtering.
+ *
+ * Format: [fieldName => value][]
+ * @var array
+ */
+ protected $values = [];
+
/**
* Search conditions that will be automatically added to the WHERE or HAVING clauses
*
ng-model="getSetSelect"
ng-model-options="{getterSetter: true}"
crm-autocomplete="$ctrl.defn.fk_entity"
- crm-autocomplete-params="{formName: 'afform:' + $ctrl.afFieldset.getFormName(), fieldName: $ctrl.afFieldset.getName() + ':' + $ctrl.fieldName}"
+ crm-autocomplete-params="{formName: 'afform:' + $ctrl.afFieldset.getFormName(), fieldName: $ctrl.afFieldset.getName() + ':' + $ctrl.fieldName, values: dataProvider.getFieldData()}"
multi="$ctrl.defn.input_attrs.multiple"
auto-open="$ctrl.defn.input_attrs.autoOpen"
quick-add="$ctrl.defn.input_attrs.quickAdd"