Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By YIY on
Is it possible to hide the Language selector form the node creation form?
I do not want to give the ability of choose a language from this box, the node should be in the same language as user's current language.
Comments
You can use hook_form_alter.
You can use hook_form_alter. print the $form and find language select in printed array.
By following ways
1st:
$form['element']['#access'] = FALSE;
2nd:
Add div with class "element-invisible"
$form['element']['#prefix'] = ' class="element-invisible">';
$form['element']['#suffix'] = '
';