How to set read only field in Drupal CiviCRM
Try $element-&gt;updateAttributes(array('readonly'=&gt;true));

The difference between readonly and disabled is a common thing with HTML and forms.

See for example https://stackoverflow.com/questions/7730695/whats-the-difference-between-disabled-disabled-and-readonly-readonly-for-ht