I'm trying to create custom view of enum field for custom options depend on status field of parent view but I could not know how to set selector.
here is my code:
This is my console response when the view created:
Please help me to fix this problem. I'm very headache on this.
Thank you everyone
here is my code:
PHP Code:
....
var modalCall = this.view.getMetadata().get("clientDefs.Call.modelViews.edit") || "views/modals/edit";
Espo.Ui.warning("Loading..."),
this.view.createView("quickCreate", modalCall, {
scope: "Call",
attributes: attributes,
headerText: this.view.model.get('name') + ' → ' + this.view.getLanguage().translateOption('Converted','leadStatus','ScotsOption'),
fullFormDisabled: !0,
backdrop: 'static',
}, (callView => {
//callView.render(),
callView.createView('paymentType', 'views/fields/enum', {
model: callView.model,
mode: 'edit',
selector: '.field[data-name="paymentType"]',
defs: {
name: 'paymentType',
params: {
required: true,
options: ['Deposit', 'Paid in full'],
tooltip: 'Flexible payment type based on parentView'
}
}
}, paymentType => {
paymentType.render()
})
.then(() => {
callView.render(),
....
Please help me to fix this problem. I'm very headache on this.
Thank you everyone
Comment