Closed ChemiKyle closed 3 years ago
I can't reproduce the issue. I tested with the same environment using REDCap 10.3.7 and auto_populate_fields_v2.6.0. After enabling the module, fields marked with @READONLY-SURVEY are disabled on the survey. Maybe their expectation is that it should be disabled on form entry?
Could not reproduce with sample project provided by Cameron Coffran.
Environment
REDCap 10.3.7
auto_populate_fields v2.6.0
Steps taken:
Results Fields marked with @READONLY-SURVEY are disabled on the survey.
Hi Michael, I tested again and noticed that if I goto External Modules (on project level) -> Configure -> Enable Auto Populate Fields on survey pages: (check this option) and go back to my survey the readonly-survey fields are editable. If I uncheck this option readonly-survey is properly greyed out. So, it seems to be dependent on this checkbox.
The module does not preserve actions tags when Enable Auto Populate Fields on survey pages
is enabled. Instead all action tags are overwritten with "@DEFAULT"
regardless of what action tag(s) the field contains. The snippet below, specifically Line 52 is responsible for this. @ChemiKyle Is that the desired behavior of the module or should action tags be preserved?
https://github.com/ctsit/auto_populate_fields/blob/71ba4f604ee3ae71a8c9d9a8d610bbdc4335027b/ExternalModule.php#L45-L57
Resolved by PR #53
https://community.projectredcap.org/questions/99382/auto-populate-fields-and-readonly-survey.html