# IDs for filter inputs

URL: https://shoptet.dev/news/frontend/ids-for-filter-inputs

September 16, 2020 · One min read
Pavel Husa

We have added `id` attributes for inputs in filter also for older templates of 1st and 2nd generation. These IDs holds unique identificator of filtering parameter.

Self-describing example below shows two filtering inputs for color and size. Attribute `data-filter-code` holds info about filter itself (in this case parametric filter), `data-filter-id` is an unique id of the filter. The `id` attribute is an unique id of parameter used for filtering and finally the `value` attribute is text value of that parameter which is displayed to customers.

```html
<input data-url="https://step.shoptet.cz/zena/?pv30=84" data-filter-id="30" data-filter-code="pv" type="checkbox" name="pv[]" id="pv[]84" value="Bílá">

<input data-url="https://step.shoptet.cz/zena/?pv18=18" data-filter-id="18" data-filter-code="pv" type="checkbox" name="pv[]" id="pv[]18" value="S">
```

**Tags:**
- [Frontend](/news/tags/frontend/)
