Theming exposed filter form drupal7

1k views Asked by At

I want to theme the exposed filter form fields in my custom form style,

How can I do that?

I tried to put the exposed filter form fields names in my custom form but no response regarding the results .

This is my code:

<form action="" method="get" id="views-exposed-form-offers-block" >
    <input type="hidden" id="edit-field-realestate-process-type-value" name="field_realestate_process_type_value" >
    <input type="hidden" id="edit-field-realestate-type-value" name="field_realestate_type_value" >
    <div class="row">
        <div class="col-xs-1 input_margin input_align">
            المدينة
        </div>
        <div class="col-xs-2 input_margin">
            <input type="text" id="edit-field-realestate-city-value" name="field_realestate_city_value" class="form-control input-sm form-text" >
        </div>
        <div class="col-xs-1 input_margin input_align">
            السعر
        </div>
        <div class="col-xs-1 input_margin input_align">
            من
        </div>
        <div class="col-xs-1 input_margin">
            <input type="text" id="edit-field-realestate-price-value" name="field_realestate_price_value" class="form-control input-sm form-text" >
            <!-- <input name="field_realestate_price_value" type="text" class="form-control input-sm" placeholder=""> -->
        </div>
        <div class="col-xs-1 input_margin input_align">
            إلي
        </div>
        <div class="col-xs-1 input_margin">
            <input type="text" id="edit-field-realestate-price-value-1" name="field_realestate_price_value_1" class="form-control input-sm form-text" >
            <!-- <input name="field_realestate_price_value_1" type="text" class="form-control input-sm" placeholder=""> -->
        </div>
    </div>
    <div class="row">
        <div class="col-xs-8 input_margin">
        </div>
        <div class="col-xs-1 input_margin input_align">
            المميزات
        </div>
        <div class="col-xs-2 input_margin">
            <!-- <input type="text" id="edit-field-realestate-features-value" name="field_realestate_features_value" class="form-control input-sm form-text" > -->
            <select id="edit-field-realestate-features-value" name="field_realestate_features_value" class="form-select" data-thmr="thmr_54">
                <option value="All" selected="selected"> الكل </option>
                <option value="مسجد">مسجد</option>
                <option value="جراج">جراج</option>
                <option value="حديقة">حديقة</option>
                <option value="أسفلت">أسفلت</option>
                <option value="كهرباء">كهرباء</option>
                <option value="ماء">ماء</option>
                <option value="غاز">غاز</option>
            </select>
        </div>
        <div class="col-xs-1 input_margin">
            <button type="submit" class="btn btn-warning btn-sm seach_black">
            <span class="glyphicon glyphicon-search"></span> بحث
            </button>
        </div>
    </div>
    <div class="row">
        <div class="col-xs-1 input_margin input_align">
            الحي
        </div>
        <div class="col-xs-2 input_margin">
            <input type="text" id="edit-field-realestate-restrict-value" name="field_realestate_restrict_value" class="form-control input-sm form-text" >
        </div>
        <div class="col-xs-1 input_margin input_align">
            المساحة
        </div>
        <div class="col-xs-1 input_margin input_align">
            من
        </div>
        <div class="col-xs-1 input_margin">
            <input type="text" id="edit-field-realestate-rooms-area-value" name="field_realestate_rooms_area_value" class="form-control input-sm form-text" >
            <!-- <input type="text" class="form-control input-sm" placeholder=""> -->
        </div>
        <div class="col-xs-1 input_margin input_align">
            إلي
        </div>
        <div class="col-xs-1 input_margin">
            <input type="text" id="edit-field-realestate-rooms-area-value-1" name="field_realestate_rooms_area_value_1" class="form-control input-sm form-text" >
            <!-- <input type="text" class="form-control input-sm" placeholder=""> -->
        </div>
    </div>
</form>
1

There are 1 answers

0
Mohammed Mansour On

i found work around for solving this issue, you must know all of the following required attributes for theming the exposed filters form :

There should be printeD classes. "> First I missed print $classess which is required by Drupal; I created views with exposed filters - then hide it with CSS and display another view (nice looking) to manage exposed filters.