Adding a field to the Create Activity Form
you need to create an extension and use the buildForm hook.
More information on creating an extension can be found here: https://docs.civicrm.org/dev/en/latest/extensions/
More information on the buildForm hook: https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_buildForm/
This contains an example of adding a field.
Another example of adding a field with the buildForm hook:
if ($studyNumber) {
  $form-&gt;addElement('text', 'study_number', &quot;Study Number&quot;, ['readonly' =&gt; 'readonly']);
  $form-&gt;setDefaults(['study_number' =&gt; $studyNumber]);
  CRM_Core_Region::instance('page-body')-&gt;add(['template' =&gt; 'CRM/Nihrbackbone/nbr_study_number.tpl',]);
}