Forums Forums Search & Filter Pro Group sets of fields

Viewing 3 posts - 1 through 3 (of 3 total)
  • Anonymous
    #38961

    Is there a way of grouping sets of fields within a search form?

    I have a form, included in my template via the shortcodes (for both form and results), which contains a search fields, and then a series of taxonomy fields.

    I’d like to arrange it (in a simplified way) something like:

    <div id="search">
        <h2>Search:</h2>
        <ul>
            <li class="sf-field-search ~~ etc.
        </ul>
    </div>
    <div id="filter">
        <h2>Filter by:</h2>
        <ul>
            <li class="sf-field-taxonomy-xx ~~ etc.
            <li class="sf-field-taxonomy-xx ~~ etc.
            <li class="sf-field-taxonomy-xx ~~ etc.
            <li class="sf-field-taxonomy-xx ~~ etc.
        </ul>
    </div>

    It’s easy to do if I create two seperate forms and include the shortcodes at the ul levels in my example, but then they don’t co-operate when it comes to results.

    Is there a template (like there is for results.php) they we can modify?

    Ross Moderator
    #39643

    Hi Nathan

    I’m afraid not, customising the search form can only be done with CSS at the moment – I’m working on an update which allows you to completely change the structure – won’t be for a month or so yet though.

    Thanks

    Anonymous
    #39849

    Hi Ross,

    Thanks for the update.

    I’ve come up with a work around until then, where I have a dummy text input where I want to display it, and have the value copied across to a hidden text input within the form.

    If anyone else is interested in doing it, here’s the jQuery I’m using to copy the value and update the search results.

    $('#search').on('keyup click change', function(event) {
    	$('.sf-input-text').val($('#search').val());
    	$('.searchandfilter').submit();
    });
Viewing 3 posts - 1 through 3 (of 3 total)