Product filter, how to make?

Hello All,

I’d like to create a product filter consisting of a number of check boxes. Depending on state of check boxes, a list of elements (hover boxes) shall appear on the page. To avoid blank gaps on the page after user input when some hover boxes need to be hidden, is there any way to change hover box coordinates?

Hey
No you cant change coordinates but you can use collapse() and they will be hidden and the elements under will be moved up.

1 Like

Hi,
Currently, you cannot add elements dynamically (meaning adding elements depends on the user’s filter choice). However, you can do the following:

  1. Bind the results of the filter to a table .

  2. Add a maximum number of elements (text boxes for example) and change their content using code. Moreover, as Andreas mentioned, you can collapse the unused elements.

Best,
Tal.

1 Like

Thanks Tal and Andreas, currently I experiment with collapse() but it seems there are some limitations exist, will see if it helps. Thanks again! Yury.

1 Like

Hello again,
Completed the filter with expand()/collapse() as per Andreas suggestion. It is interesting that when the most items are filtered out, the page keeps excessive height, so my next question is about how to remove unneeded space between last element and the footer, please?

Best,
Yury

P.S. Excessive space is calculated by Wix engine to fit all elements when they are expanded. I think the shrinking of the page height is not possible…

P.P.S. In the same time, I have found in collapse() description:

" When collapsed, elements positioned within 70 pixels below the collapsed element and each other will move up to take the collapsed element’s place where possible. The elements that move up maintain their positions relative to one another. "

In my case, the elements really move up, but the space after the last element and the footer remains. Any ideas, please?