I am trying to change the exposed filter on the homepage block to look a certain way but cannot figure out how. I founf the views-exposed-form.tpl.php and copied and renamed and place in my themes template folder. I put some test text in there and it appears where it shoudl so I think that solves that issue, but how the heck do i format the individual fields? I have devel module and I get the following in the print function:

Array
(
    [#info] => Array
        (
            [filter-field_storetype_tid] => Array
                (
                    [operator] => field_storetype_tid_op
                    [value] => field_storetype_tid
                    [label] => 
                )

            [filter-distance] => Array
                (
                    [operator] => distance_op
                    [value] => distance
                    [label] => 
                )

        )

    [field_storetype_tid] => Array
        (
            [#type] => select
            [#options] => Array
                (
                    [1] => Auto Glass Estimates
                    [2] => Automotive Detailing Services
                    [3] => Automotive Window Tint
                    [4] => Carpet Cleaning Services
                    [5] => Chimney Cleaning Services
                    [6] => Cooling Estimates
                    [7] => Electrical Estimates
                )

            [#size] => 
            [#default_value] => 1
            [#required] => 1
            [#input] => 1
            [#multiple] => 
            [#process] => Array
                (
                    [0] => form_process_select
                    [1] => ajax_process_form
                )

            [#theme] => select
            [#theme_wrappers] => Array
                (
                    [0] => form_element
                )

            [#pre_render] => Array
                (
                    [0] => ctools_dependent_pre_render
                )

            [#defaults_loaded] => 1
            [#tree] => 
            [#parents] => Array
                (
                    [0] => field_storetype_tid
                )

            [#array_parents] => Array
                (
                    [0] => field_storetype_tid
                )

            [#weight] => 0
            [#processed] => 1
            [#attributes] => Array
                (
                )

            [#title_display] => before
            [#id] => edit-field-storetype-tid
            [#name] => field_storetype_tid
            [#value] => 1
            [#needs_validation] => 1
            [#ajax_processed] => 
            [#sorted] => 1
            [#validated] => 1
            [#children] => <div class="form-item form-type-select form-item-field-storetype-tid">
 <select id="edit-field-storetype-tid" name="field_storetype_tid" class="form-select required"><option value="1" selected="selected">Auto Glass Estimates</option><option value="2">Automotive Detailing Services</option><option value="3">Automotive Window Tint</option><option value="4">Carpet Cleaning Services</option><option value="5">Chimney Cleaning Services</option><option value="6">Cooling Estimates</option><option value="7">Electrical Estimates</option></select>
</div>

            [#printed] => 1
        )

    [distance] => Array
        (
            [#tree] => 1
            [#parents] => Array
                (
                    [0] => distance
                )

            [#array_parents] => Array
                (
                    [0] => distance
                )

            [#weight] => 0.001
            [#processed] => 
            [#required] => 
            [#attributes] => Array
                (
                )

            [#title_display] => before
            [#id] => edit-distance
            [#validated] => 1
            [postal_code] => Array
                (
                    [#type] => textfield
                    [#default_value] => 
                    [#process] => Array
                        (
                            [0] => ctools_dependent_process
                        )

                    [#dependency] => Array
                        (
                        )

                    [#weight] => 3
                    [#input] => 1
                    [#size] => 60
                    [#maxlength] => 128
                    [#autocomplete_path] => 
                    [#theme] => textfield
                    [#theme_wrappers] => Array
                        (
                            [0] => form_element
                        )

                    [#pre_render] => Array
                        (
                            [0] => ctools_dependent_pre_render
                        )

                    [#defaults_loaded] => 1
                    [#tree] => 1
                    [#parents] => Array
                        (
                            [0] => distance
                            [1] => postal_code
                        )

                    [#array_parents] => Array
                        (
                            [0] => distance
                            [1] => postal_code
                        )

                    [#processed] => 1
                    [#required] => 
                    [#attributes] => Array
                        (
                        )

                    [#title_display] => before
                    [#id] => edit-distance-postal-code
                    [#name] => distance[postal_code]
                    [#value] => 
                    [#needs_validation] => 1
                    [#sorted] => 1
                    [#validated] => 1
                    [#dependency_count] => 1
                    [#dependency_type] => hide
                    [#attached] => Array
                        (
                            [js] => Array
                                (
                                    [0] => sites/all/modules/ctools/js/dependent.js
                                    [1] => Array
                                        (
                                            [type] => setting
                                            [data] => Array
                                                (
                                                    [CTools] => Array
                                                        (
                                                            [dependent] => Array
                                                                (
                                                                    [edit-distance-postal-code] => Array
                                                                        (
                                                                            [values] => Array
                                                                                (
                                                                                )

                                                                            [num] => 1
                                                                            [type] => hide
                                                                        )

                                                                )

                                                        )

                                                )

                                        )

                                )

                        )

                    [#children] => <div class="form-item form-type-textfield form-item-distance-postal-code">
  <label for="edit-distance-postal-code">Postal code </label>
 <input type="text" id="edit-distance-postal-code" name="distance[postal_code]" value="" size="60" maxlength="128" class="form-text" />
</div>

                    [#printed] => 1
                )

            [search_distance] => Array
                (
                    [#type] => textfield
                    [#title] => Distance
                    [#default_value] => 25
                    [#weight] => 9
                    [#input] => 1
                    [#size] => 60
                    [#maxlength] => 128
                    [#autocomplete_path] => 
                    [#process] => Array
                        (
                            [0] => ajax_process_form
                        )

                    [#theme] => textfield
                    [#theme_wrappers] => Array
                        (
                            [0] => form_element
                        )

                    [#pre_render] => Array
                        (
                            [0] => ctools_dependent_pre_render
                        )

                    [#defaults_loaded] => 1
                    [#tree] => 1
                    [#parents] => Array
                        (
                            [0] => distance
                            [1] => search_distance
                        )

                    [#array_parents] => Array
                        (
                            [0] => distance
                            [1] => search_distance
                        )

                    [#processed] => 1
                    [#required] => 
                    [#attributes] => Array
                        (
                        )

                    [#title_display] => before
                    [#id] => edit-distance-search-distance
                    [#name] => distance[search_distance]
                    [#value] => 25
                    [#needs_validation] => 1
                    [#ajax_processed] => 
                    [#sorted] => 1
                    [#validated] => 1
                    [#children] => <div class="form-item form-type-textfield form-item-distance-search-distance">
  <label for="edit-distance-search-distance">Distance </label>
 <input type="text" id="edit-distance-search-distance" name="distance[search_distance]" value="25" size="60" maxlength="128" class="form-text" />
</div>

                    [#printed] => 1
                )

            [search_units] => Array
                (
                    [#type] => select
                    [#options] => Array
                        (
                            [mile] => Miles
                            [km] => Kilometers
                        )

                    [#default_value] => mile
                    [#weight] => 10
                    [#input] => 1
                    [#multiple] => 
                    [#process] => Array
                        (
                            [0] => form_process_select
                            [1] => ajax_process_form
                        )

                    [#theme] => select
                    [#theme_wrappers] => Array
                        (
                            [0] => form_element
                        )

                    [#pre_render] => Array
                        (
                            [0] => ctools_dependent_pre_render
                        )

                    [#defaults_loaded] => 1
                    [#tree] => 1
                    [#parents] => Array
                        (
                            [0] => distance
                            [1] => search_units
                        )

                    [#array_parents] => Array
                        (
                            [0] => distance
                            [1] => search_units
                        )

                    [#processed] => 1
                    [#required] => 
                    [#attributes] => Array
                        (
                        )

                    [#title_display] => before
                    [#id] => edit-distance-search-units
                    [#name] => distance[search_units]
                    [#value] => mile
                    [#needs_validation] => 1
                    [#ajax_processed] => 
                    [#sorted] => 1
                    [#validated] => 1
                    [#children] => <div class="form-item form-type-select form-item-distance-search-units">
 <select id="edit-distance-search-units" name="distance[search_units]" class="form-select"><option value="mile" selected="selected">Miles</option><option value="km">Kilometers</option></select>
</div>

                    [#printed] => 1
                )

            [#sorted] => 1
            [#children] => <div class="form-item form-type-textfield form-item-distance-postal-code">
  <label for="edit-distance-postal-code">Postal code </label>
 <input type="text" id="edit-distance-postal-code" name="distance[postal_code]" value="" size="60" maxlength="128" class="form-text" />
</div>
<div class="form-item form-type-textfield form-item-distance-search-distance">
  <label for="edit-distance-search-distance">Distance </label>
 <input type="text" id="edit-distance-search-distance" name="distance[search_distance]" value="25" size="60" maxlength="128" class="form-text" />
</div>
<div class="form-item form-type-select form-item-distance-search-units">
 <select id="edit-distance-search-units" name="distance[search_units]" class="form-select"><option value="mile" selected="selected">Miles</option><option value="km">Kilometers</option></select>
</div>

            [#printed] => 1
        )

    [submit] => Array
        (
            [#name] => 
            [#type] => submit
            [#value] => Search
            [#id] => edit-submit-zip-locator
            [#input] => 1
            [#button_type] => submit
            [#executes_submit_callback] => 1
            [#limit_validation_errors] => 
            [#process] => Array
                (
                    [0] => ajax_process_form
                )

            [#theme_wrappers] => Array
                (
                    [0] => button
                )

            [#defaults_loaded] => 1
            [#tree] => 
            [#parents] => Array
                (
                    [0] => submit
                )

            [#array_parents] => Array
                (
                    [0] => submit
                )

            [#weight] => 0.002
            [#processed] => 1
            [#required] => 
            [#attributes] => Array
                (
                )

            [#title_display] => before
            [#ajax_processed] => 
            [#sorted] => 1
            [#validated] => 1
            [#children] => <input type="submit" id="edit-submit-zip-locator" name="" value="Search" class="form-submit" />
            [#printed] => 1
        )

    [#action] => /zip-locator
    [#theme] => Array
        (
            [0] => views_exposed_form__zip_locator__default
            [1] => views_exposed_form__default
            [2] => views_exposed_form__default
            [3] => views_exposed_form__zip_locator
            [4] => views_exposed_form
        )

    [#id] => views-exposed-form-zip-locator-default
    [#form_id] => views_exposed_form
    [#type] => form
    [#method] => get
    [#build_id] => form-lkg3Vwt89AfrjsPKVuEdWCTkmltpEFwXnd727iedeE8
    [form_build_id] => Array
        (
            [#type] => hidden
            [#value] => form-lkg3Vwt89AfrjsPKVuEdWCTkmltpEFwXnd727iedeE8
            [#id] => form-lkg3Vwt89AfrjsPKVuEdWCTkmltpEFwXnd727iedeE8
            [#name] => form_build_id
            [#access] => 
            [#input] => 1
            [#process] => Array
                (
                    [0] => ajax_process_form
                )

            [#theme] => hidden
            [#defaults_loaded] => 1
            [#tree] => 
            [#parents] => Array
                (
                    [0] => form_build_id
                )

            [#array_parents] => Array
                (
                    [0] => form_build_id
                )

            [#weight] => 0.003
            [#processed] => 1
            [#required] => 
            [#attributes] => Array
                (
                )

            [#title_display] => before
            [#ajax_processed] => 
            [#sorted] => 1
            [#validated] => 1
        )

    [#token] => views_exposed_form
    [form_token] => Array
        (
            [#id] => edit-views-exposed-form-form-token
            [#type] => token
            [#default_value] => 4WMT6Hlil389peQHZ_9GQbudqqMIgROcsC7gFQ2hF2s
            [#access] => 
            [#input] => 1
            [#theme] => hidden
            [#defaults_loaded] => 1
            [#tree] => 
            [#parents] => Array
                (
                    [0] => form_token
                )

            [#array_parents] => Array
                (
                    [0] => form_token
                )

            [#weight] => 0.004
            [#processed] => 
            [#required] => 
            [#attributes] => Array
                (
                )

            [#title_display] => before
            [#name] => form_token
            [#value] => 4WMT6Hlil389peQHZ_9GQbudqqMIgROcsC7gFQ2hF2s
            [#sorted] => 1
            [#validated] => 1
        )

    [form_id] => Array
        (
            [#type] => hidden
            [#value] => views_exposed_form
            [#id] => edit-views-exposed-form
            [#access] => 
            [#input] => 1
            [#process] => Array
                (
                    [0] => ajax_process_form
                )

            [#theme] => hidden
            [#defaults_loaded] => 1
            [#tree] => 
            [#parents] => Array
                (
                    [0] => form_id
                )

            [#array_parents] => Array
                (
                    [0] => form_id
                )

            [#weight] => 0.005
            [#processed] => 1
            [#required] => 
            [#attributes] => Array
                (
                )

            [#title_display] => before
            [#name] => form_id
            [#ajax_processed] => 
            [#sorted] => 1
            [#validated] => 1
        )

    [#theme_wrappers] => Array
        (
            [0] => form
        )

    [#tree] => 
    [#parents] => Array
        (
        )

    [#validate] => Array
        (
            [0] => views_exposed_form_validate
        )

    [#submit] => Array
        (
            [0] => views_exposed_form_submit
        )

    [#processed] => 
    [#defaults_loaded] => 1
    [#required] => 
    [#attributes] => Array
        (
        )

    [#title_display] => before
    [#array_parents] => Array
        (
        )

    [#sorted] => 1
    [#validated] => 1
    [#children] => 
    [field_storetype_tid_op] => 
    [distance_op] => 
)

I would like to make the drop down default to "I am searching for..." and then the postal code box, I would like to remove the label and add the text "Enter your zipcode here" and I would like that to dissapear when the user starts typing. I also need to edit the size and postion, which I could do with css I think.

Has anyone had any luck, I have ready all sorts of articles, some people say to create a module which I have done as well, but I still have had no luck.

Comments

kars-t’s picture

Status: Active » Fixed

Hi

I am closing this issue to clean up the issue queue. Feel free to reopen the issue if there is new information and the problem still resides. If not please make sure you close your issues that you don't need any more.

Maybe you can get support from the local user group. Please take a look at this list at groups.drupal.org.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

mattbk’s picture

Status: Closed (fixed) » Active

I would definitely like to know this.

kars-t’s picture

Status: Active » Fixed

Hi

please give more information about what you want to do. And read about hook_form_alter() as it seems that this can be done through the FAPI.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.