Reefine
ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4, ExpressionEngine 5, ExpressionEngine 6
Back to this add-on's main page
View Other Add-ons From Patrick Woodcock
Multipe Select for Relationship-Field
Support (Resolved)
amadeus
|
Posted: 08 February 2017 07:41 AM |
|
|
|
Great addon!
Trying to use a multiple select Filter for a relationship field. It works when I select a single entry in the multiple select. When I select two entries, it only shows ONE entry. Even the url is not combined with “-or-”? Here is my reefine tag:
{exp:reefine channel="ddb_deals" filter:customer:fields="ddb_deal_customer" filter:customer:label="Customer" filter:customer:delimiter="|" url="/{segment_1}/{customer}" parse="inward" status="Public|Open" }
and here is the filter part:
<form method="get" action="/{segment_1}"> <div class="select-filter"> <fieldset> <label id="customer_label" for="customer_select">Filter by customer</label> <select name="customer" id="customer_select" aria-describedby="customer_label customer_select" multiple> <option value="">Any type</option> {customer} {filters} <option value="{filter_value}" {if filter_active}selected{/if}>{filter_title} ({filter_quantity})</option> {/filters} {/customer} </select> </fieldset> <button type="submit" class="apply-filter filter1">Apply Filter</button> <a href="/{segment_1}" class="apply-filter filter2 selected">Show All</a> </div> </form>
What is wrong?
|
|
|
Ralph
|
Posted: 08 February 2017 07:59 AM |
# 1
|
|
|
Hi.
Thanks, glad you like Reefine. I haven’t tested using <select multiple> before so that may be the issue. I’ll investigate when I’m back in the office tomorrow.
Cheers
Patrick.
|
|
|
amadeus
|
Posted: 08 February 2017 08:26 AM |
# 2
|
|
|
Hi,
thank you for answering so fast! Because everything is documented so well I thought so that maybe the multiple select option was not considered or tested ... it would be really great if I could bring this to live with your help :)
Looking forward to hear from you!
|
|
|
Ralph
|
Posted: 09 February 2017 06:53 AM |
# 3
|
|
|
Hi
Can you try adding [] to the end of the name param on select, like this:
<select name="customer[]" id="customer_select" aria-describedby="customer_label customer_select" multiple>
Cheers
Patrick.
|
|
|
amadeus
|
Posted: 09 February 2017 07:06 AM |
# 4
|
|
|
Works! Great…
|
|
|
Ralph
|
Posted: 09 February 2017 07:45 AM |
# 5
|
|
|
Great, let me know if you have any other questions.
|
|
|