Leave a comment at the end of this page or email contact@krishagni.com
Participant page: Make the fields read-only
Note: This applies only to the Participant page.
It is best to keep fields read-only when the values for fields are coming from other systems (E.g. REDCap, Epic, etc).
Below is the list of different attribute types that can be made as read-only.
Attribute Type | Description | Example JSON |
|---|---|---|
Text | Gender field made as read-only by setting 'type: span" | text field{
"name" : "cpr.participant.gender",
"caption" : "Gender",
"type" : "span",
"attr" : "gender",
"optional" : true
}, |
date | To made the date field as read-only, set the "type" : "span" and "formatType" : "date" | date{
"name" : "cpr.participant.birthDate",
"caption" : "Birth Date",
"type" : "span",
"formatType" : "date",
"dateOnly" : true,
"optional" : true
}, |
Number | Made the customs form field as read-only | Custom form field {
"name" : "specimen.extensionDetail.attrsMap.ST30",
"caption" : "Time Lapse",
"type" : "span",
"optional" : true
} |
Dropdown(custom field) | A drop-down field from the custom form is also able to make as read-only by setting the "type": "span" from "dropdown" | dropdown{
"name": "specimen.extensionDetail.attrsMap.DD20",
"caption": "Method",
"type": "span",
"optional": true,
"listSource": {
"apiUrl": "forms/permissible-values",
"selectProp": "value",
"displayProp": "value",
"queryParams": {
"dynamic": {},
"static": {
"formName": "SpecimenAdditionalFields",
"controlName": "DD20"
}
}
}
} |
Radiobutton | Made radio button field read-only by specifying the "type": "span". | radio{
"name": "specimen.extensionDetail.attrsMap.RB2",
"caption": "Medical data base",
"type": "span",
"optional": true,
"options": ["Yes","No"],
"defaultValue": "Yes"
} |
Yes/No Checkbox | Made Checkbox to the read-only field by specifying "type": "span". | checkbox{
"name": "specimen.incrParentFreezeThaw",
"caption": "Increment parent specimen's Freeze/Thaw cycles?",
"type": "span",
"optional": true,
"options": [
{
"caption": "Yes",
"value": 1
},
{
"caption": "No",
"value": 0
}
]
} |
Multiselect fields PV | disableWhen: "1 != 0" - tells to disable the input in the add/edit page | {
"name" : "cpr.participant.extensionDetail.attrsMap.dropdown_m",
"caption" : "Multi select",
"type" : "dropdown",
"optional" : true,
"multiple" : true,
"disableWhen" : "1 != 0",
"listSource" : {
"apiUrl" : "forms/permissible-values",
"selectProp" : "value",
"displayProp" : "value",
"queryParams" : {
"dynamic" : { },
"static" : {
"formName" : "skin_cancer_registration_custom_field_form",
"controlName" : "dropdown_m"
}
}
}
}, |
Multiselect dropdown | disableWhen: "1 != 0" - tells to disable the input in the add/edit page | {
"name" : "cpr.participant.races",
"caption" : "Race",
"type" : "pv",
"attr" : "race",
"selectProp" : "value",
"optional" : true,
"multiple" : true,
"disableWhen" : "1 != 0"
}, |
Leave a comment at the end of this page or email contact@krishagni.com