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.
Instead of
<select id="edit-my-name-select-1" class="shs-select form-select shs-select-level-1" style="display: inline-block;">
---
<select id="edit-my-name-select-1" class="shs-select form-select shs-select-level-1" name="my_name" style="display: inline-block;">
Not sure if there is a need to differentiate levels with different names
Comments
Comment #1
PlayfulWolf CreditAttribution: PlayfulWolf commentedNot sure if this is related but code like:
$form['field_name']['#options']['All'] = t('My custom text');
does not work on SHS Views filter.
Comment #2
stBorchertI don't see a need to add the name attribute here, since the original (hidden) element still have it. For theming, you don't need the name either.
To override the option for value "All", see
hook_shs_js_settings_alter()
.Comment #3
Allan.ordogh CreditAttribution: Allan.ordogh commentedYou need a name attribute if you want to use #states: