In Drupal 8 I am trying to add in a suggestion via hook_theme_suggestions_alter() like so:
function ua_sc_theme_theme_suggestions_alter(array &$suggestions, array $variables, $hook) {
print '<!-- hook: ' . $hook . '-->';
if (in_array($hook, ['input', 'form_element']) && $variables['element']['#attributes']['id'] == 'edit-keys') {
$suggestions[] = $hook . '__custom';
}
}
...and then I give my template a name of form-element__custom.html.twig and put it in my theme it doesn't get used an instead the default form-element.html.twig template is used. Any thoughts on what is going on?