Use form_alter to add placeholder text to a Views Exposed Filter min/max field I have an exposed "List Price" field in a View using the "in between" operator (so that users can search for content between this price and that price), and I need to add the text "Min Price" and "Max Price" as placeholder text for the Min and Max fields. I had success using the custom module below to add placeholder text to other exposed fields using the "is equal to" operator, but I have had no luck using the same module code to affect the min/max fields. Here is my working module code:

&lt;?php
function bootstrap_primary_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if($form_id == "views_exposed_form") {
    if (isset($form['field_productname_value'])) {
            $form['field_productname_value']['#attributes'] = array('placeholder' =&gt; array(t('Product Name')));
    }
  }
 }
?&gt;


and here is the code that does NOT work for the "min" portion of the price field:

&lt;?php
function bootstrap_primary_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if($form_id == "views_exposed_form") {
    if (isset($form['field_listprice_value[min]'])) {
            $form['field_listprice_value[min]']['#attributes'] = array('placeholder' =&gt; array(t('Min Price')));
    }
  }
 }
?&gt;


Can someone please guide me on what I am doing wrong and how I can make it work? Could it possibly me the "[min]" portion of the module code that is tripping things up?

In case it helps, here is the full code for the List Price field:

&lt;div class="views-exposed-widget views-widget-filter-field_listprice_value" id="edit-field-listprice-value-wrapper"&gt;
                  &lt;label for="edit-field-listprice-value"&gt;
            List Price          &lt;/label&gt;
                        &lt;div class="views-widget"&gt;
          &lt;div class="form-type-textfield form-item-field-listprice-value-min form-item form-group"&gt;
  &lt;input type="text" maxlength="128" size="30" value="" name="field_listprice_value[min]" id="edit-field-listprice-value-min" class="form-control form-text"&gt;
&lt;/div&gt;
&lt;div class="form-type-textfield form-item-field-listprice-value-max form-item form-group"&gt;
  &lt;label for="edit-field-listprice-value-max"&gt;And &lt;/label&gt;
 &lt;input type="text" maxlength="128" size="30" value="" name="field_listprice_value[max]" id="edit-field-listprice-value-max" class="form-control form-text"&gt;
&lt;/div&gt;
        &lt;/div&gt;
              &lt;/div&gt;


...and here is the full code for the field that the module worked on:

&lt;div class="views-exposed-widget views-widget-filter-field_productname_value" id="edit-field-productname-value-wrapper"&gt;
                  &lt;label for="edit-field-productname-value"&gt;
            Product Name          &lt;/label&gt;
                        &lt;div class="views-widget"&gt;
          &lt;div class="form-type-textfield form-item-field-productname-value form-item form-group"&gt;
 &lt;input type="text" maxlength="128" size="30" value="" name="field_productname_value" id="edit-field-productname-value" class="form-control form-text" placeholder="Product Name"&gt;
&lt;/div&gt;
        &lt;/div&gt;


Thanks!
Found the solution!!! (here: https://www.drupal.org/node/2280069#comment-8844805)

  if (isset($form['field_listprice_value']['min'])) {
    $form['field_listprice_value']['min']['#attributes'] = array('placeholder' =&gt; array(t('Min Price')));
  }
  if (isset($form['field_listprice_value']['max'])) {
    $form['field_listprice_value']['max']['#attributes'] = array('placeholder' =&gt; array(t('Max Price')));
  }