custom action of button component doesn't change data
when i use button component with custom action with this code: data.myFieldName = "100"; when i click on the button it doesn't change the field's data
i thinks this should be a bug
same code works on ngFormio (angular based form renderer)
Hello Amir,
William here with the Form.io support team. Great to hear from you!
It is not expected to populate data using the button component. Component controls its own value.
The best way to do this is to either:
- Have myFieldName be a calculated value or
- Set the button to trigger a custom event and then use the Logic tab on the component to listen for the event and set its value.
Let me know if you have any further questions or concerns.
Thanks,
William Gay
Hi William,
thanks for your response. ok i will do that. but in your previous versions i could use the button component to change the other fields data. i think it has changed in latest version.
Thanks, Amir
Hello Amir,
William here with the Form.io support team. Great to hear from you!
It is not expected to populate data using the button component. Component controls its own value.
The best way to do this is to either:
- Have myFieldName be a calculated value or
- Set the button to trigger a custom event and then use the Logic tab on the component to listen for the event and set its value.
Let me know if you have any further questions or concerns.
Thanks,
William Gay
Hi @wag110894 ,
When you create a button with "Custom Logic" the default placeholder text seems to suggest you can update data field from a button. Has there bee any changes since you responded to this issue?
