@@ -327,19 +327,28 @@ def process_row(
327327
328328    field_type  =  field .get ("Field Type" , "" )
329329    input_type , value_type  =  parse_field_type_and_value (field )
330-     rowData ["ui" ] =  {"inputType" : input_type }
330+     
331+     # Initialize ui object with common properties 
332+     ui_obj  =  {"inputType" : input_type }
333+     
334+     # Handle readonly status first - this affects UI behavior 
335+     annotation  =  str (field .get ("Field Annotation" , "" )).upper ()
336+     if  (field_type  in  COMPUTE_LIST  or  
337+         "@READONLY"  in  annotation  or  
338+         "@CALCTEXT"  in  annotation ):
339+         ui_obj ["readonlyValue" ] =  True 
340+ 
341+     rowData ["ui" ] =  ui_obj 
331342    rowData ["responseOptions" ] =  {"valueType" : [value_type ]}
332343
333-     # setting additional fields for some  field types  
344+     # Handle specific  field type configurations  
334345    if  field_type  ==  "yesno" :
335346        rowData ["responseOptions" ]["choices" ] =  [
336347            {"name" : {"en" : "Yes" }, "value" : 1 },
337348            {"name" : {"en" : "No" }, "value" : 0 },
338349        ]
339350    elif  field_type  ==  "checkbox" :
340351        rowData ["responseOptions" ]["multipleChoice" ] =  True 
341-     elif  field_type  in  COMPUTE_LIST :
342-         rowData ["ui" ]["readonlyValue" ] =  True 
343352
344353    for  key , value  in  field .items ():
345354        if  SCHEMA_MAP .get (key ) in  ["question" , "description" ] and  value :
0 commit comments