[英]Is it possible to trigger an event when a form field value in formio form changes?
I am using formio angular to render a simple form.我正在使用 formio angular 来呈现一个简单的表单。 The form has a birthday field and when initialized, it has a default value and if it is changed, is it possible to emit an event if the default value has been changed?
表单有一个生日字段,初始化时有一个默认值,如果更改,是否可以在默认值已更改的情况下发出事件?
Yes, it is possible.是的,有可能。
<formio
[form]="formDefinition"
(change)="onChange($event)"
></formio>
You can subscribe for the change
event which will emit whenever a value in the form is altered.您可以订阅
change
事件,该事件将在表单中的值发生更改时发出。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.