Inlcude search by "property type" in index page

Discussion in 'Real Estate Classifieds Script' started by guigox, Jun 13, 2020.

  1. guigox

    guigox New Member

    Hello guys, I hope everybody is doing great.

    My site currently have one field to search only by location on the index page, I want to include an extra field for "property type". I use the following code, but it does not work for "property type" does not even fetch the property type list, any advice would be great. Thank you


    PHP:
    <form action="{$smarty.const.IA_URL}" method="get" class="home-search-form" id="index-search">
                        <div class="input-append pull-left">
                            <select class="input-prepend span2" name="category" id="search-category">
                                <option value="venta">{lang key='field_category_sale'}</option>
                                <option value="arriendo">{lang key='field_category_rent'}</option>
                                <option value="projects">{lang key='field_category_projects'}</option>
                                <!--<option value="vacation_properties">{lang key='field_category_vacation_properties'}</option>-->
                            </select>
                    </select>
                            </select>
                        </div>

                        <div class="input-prepend pull-left">
                            <input class="span4" type="text" name="keyword" autocomplete="off" id="slider-qs-keyword"{if isset($ip_location.city) && $ip_location.city != 'Limit Exceeded'} value="{$ip_location.city}"{else} placeholder="Escribe barrio, zona o ciudad"{/if}>
                        </div>
                       
                        <select name="type" id="re-sl-type" class="input-block-level">

                            <option value="">Tipo de Propiedad</option>

                            {foreach $realestate_blocks.search.type as $value => $title}

                                <option value="{$value}"{if $realestate_blocks.search.defaults.type eq $value} selected="selected"{/if}>{$title}</option>

                            {/foreach}

                        </select>

                        <button id="index-search-submit" class="btn btn-large btn-primary pull-right" type="submit"><i class="icon-search"> {lang key='search'}</i></button>
                    </form>

Share This Page