New: Read Only Gadgets and Default Values
You can now control how data is set and edited in your forms with new Read-only and Default Value configurations. This makes it easier to support integrations, protect source-of-truth data, and standardize key values across your forms.
Read-Only Configuration
There are times you may need to define a fixed value for integrations or calculations, such as a standard rate for a calculated value. This is especially useful when data is pushed into a Kuali form from another system that serves as the source of truth and should remain uneditable. We've added the new gadget configuration option of Make this field Read-only that will make the field read-only for the end user but could be updated via API interactions or utilizing default values (explained more below).
This configuration option is available for the following gadgets:
- Short Text
- Long Text
- Link
- Number
- Currency
- Date
Default Value Configuration
We’ve also added a new Set default value configuration, so you can predefine one or more default values depending on the field type. This allows you set a default value if you desire on a user editable field but can also be used in conjunction with the Read-only configuration to use for calculation purposes (i.e. a fixed rate you want to utilize to calculate a cost - for example, setting a default read-only per deim rate and the user enters the amount of days which would allow you to calculate the desired value. This configuration option is available for the following gadgets:
- Short Text
- Long Text
- Number
- Currency
For those those gadgets that allow multi-select you'll see the Default options displayed under the configured options:
- Multiple Choice
- Dropdown
- Checkbox
Use Case Example
One practical use case for this new functionality is a travel request app that automatically calculates per diem. You could have a Number gadget where the end user enters the number of travel days and then use a Currency gadget that's set with both the Read-only and Default Value of $178.00 - so it would be view only but could be utilized for calculations:
You can then add a Currency field and configure a calculation that takes the product of the number of travel days and the per diem rate, automatically generating the total: