• Hy guys,

    how can i build a search with checkbox.

    Post type: locatii.

    <form method="get" name="searchform" action="<?php bloginfo('url'); ?>/">
    <input type="text" value="<?php the_search_query(); ?>" name="s"/><br>
    <input type="checkbox" name="tip" value="locatii">Tip 1<br>
    <input type="checkbox" name="tip" value="locatii">Tip 2<br>
    <input type="checkbox" name="tip" value="locatii">Tip 3<br>
    <input type="checkbox" name="tip" value="locatii">Tip 4<br>
    <input type="checkbox" name="tip" value="locatii">Tip 5<br>
    <input type="checkbox" name="tip" value="locatii">Tip 6<br>
    <input type="checkbox" name="tip" value="locatii">Tip 7<br>
    <input type="submit" name="search" value="<?php _e('Search'); ?>" />
    </form>

    In the post type i have categories, Tip1, Tip2, Tip3…

    So wath i want to get the result base on selection.

    Example: i select tip 2, tip 5 – i get all the results that are in that categories.( tip2,tip5)

    Thanks.

  • The topic ‘How can i build a search with checkbox’ is closed to new replies.