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.
If a filter has a custom filter identifier and you add a placeholder text for that filter in the exposed form options the placeholder is not shown in the form field for that filter.
This is caused by the fact that the #placeholder key is added to the original filter identifier instead of the custom filter identifier.
Comments
Comment #2
ricovandevin CreditAttribution: ricovandevin at Finlet for One Shoe commentedPatch attached.
Comment #3
godotislate CreditAttribution: godotislate commentedI think all that's needed is to change the array index from
$label
to$field_id
.Comment #4
NitebreedA solution for this (same as patch #3) is already commited in #2895536: Allow placeholder option for SearchAPI filters