I need to customize the aspect of one single field in a editing admin form. More specifically I want change the height of a multiselect field. Have I to create complete admin sub-theme containing just a one-line CSS file or there is another way to achieve this?

1 Answer 1


You could use hook_form_alter in a module to attach a the CSS (library) to the form with the needed changes.

  • Thanks. Can I use this function for ADMIN forms? If yes, how can I prevent to lose it with further core updates?
    – Gabriele
    Commented Feb 3, 2016 at 15:46
  • @Gabriele You should look at hook_form_alter in the documentations (api.drupal.org). I'm expecting you know how to make a module understand hooks etc in my answer, as those are needed.
    – googletorp
    Commented Feb 3, 2016 at 19:35
  • Ok, I was needing to be sure that my question was not misunderstood. I'm quite new to Drupal, I will read the docs about hook_form_alter carefully. Thanks a lot!
    – Gabriele
    Commented Feb 3, 2016 at 22:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.