Conditional UI: hidden form fields #16994
-
|
Problem: take the example for conditional UI and form bindings in the documentation: https://docs.budibase.com/docs/form-bindings#tutorial-calculate-age-from-dob-field The field "Age" with the calculated age is disabled. What if I want the "Age" field to be invisible? I found that as soon as I hide the component using conditional UI, its value can no longer be changed. Any ideas how to update a hidden form field? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Hi, @sebsca. Perhaps creating a view of the main table is the better option. After a view is created, there is a 'Columns' section where you can choose the columns that might be visible and even which ones can be edited by the Role to which has been granted Access. In the case below, the table name is 'Contracts' and the view is called 'FTE Counts.' This view actually has far less available columns from the main table, but in this case, we can alter the availability of all the columns. Notice that most of these are not going to be visible by the user accessing the UI, hence the crossed-out eyeball on the right. So this means that only the Role, Sigmatech Fte and Sub Fte columns are the only ones visible. and only the Role column can be modified by the user. And of course, since this is merely a view of the main table, this does not hinder and other processes that might interact with that table. I hope that helps.
|
Beta Was this translation helpful? Give feedback.
-
|
Add the hidden column in 'save row' and use appropriate js for it. You can also set it as a dynamic formula field in the table and use the appropriate calculation for it. If you set it as fixed, it will be updated when creating and updating. If dynamic, it will provide current age whenever it is retrieved as well. |
Beta Was this translation helpful? Give feedback.

Add the hidden column in 'save row' and use appropriate js for it.
You can also set it as a dynamic formula field in the table and use the appropriate calculation for it. If you set it as fixed, it will be updated when creating and updating. If dynamic, it will provide current age whenever it is retrieved as well.