I'm a complete newby on Craft CMS and twig templating so please bear with me.
I currently have a users base which I want to filter by category (a custom field)
This would be my only input search element:
<select name="professionalita">
<option value="" disabled selected>Professionalità</option>
{% for category in craft.categories.group('professionalita') %}
<option value="{{category.url}}">{{ category.title }}</option>
{% endfor %}
</select>
This is what I tried to build on results.html page.
{# Get the search data #}
{% set profParam = craft.request.getParam('professionalita') %}
{% extends "_inc/layout" %}
{% block main %}
{# Find and list matching entries #}
{% set members = craft.users.group.('members').relatedTo(profParam) %}
{% if members|length %}
<ul>
{% for member in members %}
<li>{{ member.firstName }}</li>
{% endfor %}
</ul>
{% else %}
No members found.
{% endif %}
{% endblock %}
I get no results even if there are actually correspondencies between the users and the category name being searched for.