Tags: drupal
Use hook_form_alter
E.g. for a module called xmljob
:
function xmljob_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id)
{
if ($form_id == "node_jobs_edit_form") {
$form['field_job_posted_to_sharepoint']['#attributes']['disabled'][] = 'disabled';
$form['field_job_posted_to_sharepoint']['#access'] = false;
}
}
This page has been requested 7377 times