Budibase / budibase

Low code platform for building business apps and workflows in minutes. Supports PostgreSQL, MySQL, MariaDB, MSSQL, MongoDB, Rest API, Docker, K8s, and more 🚀
https://budibase.com
Other
21.78k stars 1.49k forks source link

Can't copy checkbox and relationship picker value using action with handlebar #14444

Closed ksstms closed 2 weeks ago

ksstms commented 2 weeks ago

Checklist

Hosting

Describe the bug I'm using the "Update Field Value" action to copy the state of one checkbox to another. The second checkbox always gets checked no matter the state of the first one. This is only a problem using the handlebar notation, JS works fine. The same is true for relationship pickers.

To Reproduce Steps to reproduce the behavior:

  1. Create a form with 2 checkboxes and a button.
  2. Add an on-click action to the button as shown beloow image
  3. Check how clicking the button changes the target checkbox.

Expected behavior Clicking the button should change the second checkbox state to the first one's state.

Desktop (please complete the following information):

linear[bot] commented 2 weeks ago

BUDI-8590 Can't copy checkbox and relationship picker value using action with handlebard

andz-bb commented 2 weeks ago

hey @ksstms, by default handlebars will be returning "true" or "false" as strings rather than boolean type.

If you try {{ literal form.Fields.cb2 }} it might return the boolean type instead.

ksstms commented 2 weeks ago

Thank you @andz-bb. For the record, the same solution applies to the relationship picker as well