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.
hello.. I want hide an option in a select field if (..) ..
e.g. I have a field_food ckk field on a recepies content type (it's almost dinner time here...) with:
a|potatoes
b|pasta
c|tomatoes
d|cake
and in the add recepies node form I want hide the cake option of the field_food.
I managed to get the form event, but I don't know how to alter (hide) a single option of a form element..
Any help?
Comments
Comment #1
TR CreditAttribution: TR commented