<?php
/*
* @packge kyrill
* @since 1.0.0
*/

?>
<form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
    <input type="text" class="search-field" placeholder="<?php esc_attr_e( 'Search here...', 'hostiko' ); ?>" value="<?php echo get_search_query(); ?>" name="s" required>
    <?php
    if(isset($_GET['view'])){
        $view_parameter = sanitize_text_field( wp_unslash( $_GET['view'] ) ); 
    ?>
    <input type="hidden" name="view" value="<?php echo esc_attr( $view_parameter ); ?>">
    <?php
    }
    ?>
    <button type="submit" class="search-submit">
        <i class="fa fa-search"></i>
    </button>
</form>