formio / angular

JSON powered forms for Angular
https://formio.github.io/angular-demo
MIT License
613 stars 461 forks source link

[Question] How to add event or call function on button click and remove data from key and value in formio #1068

Open vinayrdy966 opened 1 month ago

vinayrdy966 commented 1 month ago
image

I have created custom tab called mapping in formio, now on Add workflow property button click, I need to add that value to above dropdown and clear the data from key and value.

Also after clicking on add new button only one input box should come not multiple should create.

Is there any way I can call function in angular like addProperty() after button click. I have used form-builder for it and code is: const newTab = { key: 'mapping', label: 'Mapping', components: [ { weight: 30, type: 'select', label: 'Workflow Property', tooltip: 'Workflow Property', key: 'workflowProperty', input: true, inline: true, data: { values: workflowPropertyValues } }, { label: 'Create Workflow Property', addAnother: 'Add Workflow Property', customClass: 'pr-4 pl-4', tableView: false, key: 'workflowpropertycreate', type: 'datamap', input: true, valueComponent: { type: 'textfield', key: 'value', label: 'Value', input: true, hideLabel: true, tableView: true } } ] };