Good morning,
I need to achieve this: In edit mode (create and update record), have checkbox field with this behavior:
- if check == false --> show a text field and a dropdown field.
In studio --> My module --> text field I set a default value (-1). When the fields are shown, the text field must populate with a value read from another table (custom table, into the same database, but not connected with module’s tables). I can’t set the default value into Studio cause the default value can be change depending on other process that write into my custom table from I would like to read the default value. - if check == true --> text field and dropdown field must hide, and (desirably) near che checkbox field show a label similar to
"Default: <default value>"
where is read from my custom table (or, I don’t know, a hint button that when is press or mouse over shows the informtions)
So:
- how can I implement (upgrade safe and if is possibile best way) the logic to show/hide fields based on checkbox value ?
- It is possible read value from a custom table to populate the textfield? If true, how can I implement this mechanism?
I’ll try explain with a example:
- In my custom table, I have one record with some columns in particular
columnA
andcolumnB
; respectively withvalueA
andvalueB
values. - In my custom module, I have a checkbox field
checkField
, text fieldcustomA
and dropdown fieldcustomB
- when
checkField
== false,customA
andcustomB
fields, must show, and populate with values take from custom table:customA
withvalueA
andcustomB
withvalueB
. - when
checkField
== true,customA
andcustomB
fields, must hide, andcustomA
set to “-1” (value defined into Studio), and if possibile, showvalueA
andvalueB
near checkbox field into a label
Thank you so much for the help, Hope my explanation was clear,
B.