diff --git a/program2021/migrations/0003_auto_20200805_1034.py b/program2021/migrations/0003_auto_20200805_1034.py
new file mode 100644
index 0000000000000000000000000000000000000000..2f1685a80598512a85ebef1a1430f400272f42d7
--- /dev/null
+++ b/program2021/migrations/0003_auto_20200805_1034.py
@@ -0,0 +1,33 @@
+# Generated by Django 3.0.8 on 2020-08-05 08:34
+
+from django.db import migrations, models
+import django.db.models.deletion
+import modelcluster.contrib.taggit
+import modelcluster.fields
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('taggit', '0003_taggeditem_add_unique_index'),
+        ('program2021', '0002_auto_20200805_0726'),
+    ]
+
+    operations = [
+        migrations.CreateModel(
+            name='Program2021PointPageSearchTag',
+            fields=[
+                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+                ('content_object', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, to='program2021.Program2021PointPage')),
+                ('tag', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='program2021_program2021pointpagesearchtag_items', to='taggit.Tag')),
+            ],
+            options={
+                'abstract': False,
+            },
+        ),
+        migrations.AddField(
+            model_name='program2021pointpage',
+            name='search_tags',
+            field=modelcluster.contrib.taggit.ClusterTaggableManager(blank=True, help_text='Tagy pro vyhledavani. Musi byt zadany presne, aby to fungovalo. Tagy jsou deleny do skupin se spolecnym prefixem, napr. "gender".  \nPriklad: chces-li programovy bod pouze pro muze, zadej tag "gender-male", pokud je to jedno, musis zadat tag "gender-every". Seznam tagu a skupin:\nx y z\nb d f\nl o p q\n         ', related_name='search_tags', through='program2021.Program2021PointPageSearchTag', to='taggit.Tag', verbose_name='Tags'),
+        ),
+    ]
diff --git a/program2021/models.py b/program2021/models.py
index 9d10e0812cf25614d27e82aeab90d9afc12e978a..15de764f938da186a620825a29cbe189e6c4817b 100644
--- a/program2021/models.py
+++ b/program2021/models.py
@@ -54,7 +54,33 @@ class Program2021HomePage(Page):
 
     def get_context(self, request):
         context = super().get_context(request)
-        context["points"] = self.get_children().live().specific()
+        if request.method == "POST":
+
+            # odeslany formular vyhledavani v programovych bodech.
+            # Shromazdi vsechny tagy; neni-li nejaky ze skupiny zadan, dodej tag "<skupina>-every"
+            # Logika: v programovem bodu pak zadas bud tag nepr "gender-male" pro muzska temata
+            # nebo "gender-every" pro genderove nespecificka.
+            required_tags = []
+
+            # tohle jsou checkboxy, muze jich byt zaskrknuto zadny nebo nekolik
+            for x in ["travel-bike", "travel-car", "travel-public"]:
+                if request.POST.get(x, ""):
+                    required_tags.append(x)
+            if not required_tags:
+                required_tags.append("travel-every")
+
+            # selecty mohou mit vzdy jen jednu hodnotu
+            for x in ["age", "gender", "kids", "occupation", "wealth", "housing", "education"]:
+                required_tags.append(x + "-" + (request.POST.get(x, "") or "every"))
+
+            # TODO : rozpracovana vec, funguje spatne, vrati vsechny body co maji aspon jeden tag
+            # bude treba prevest na vahy tagu
+            context["points"] = self.get_children().live().specific().filter(program2021pointpage__search_tags__name__in=required_tags).distinct()
+            raise NotImplementedError
+
+        else:
+            # neformular - vrat vsechny body
+            context["points"] = self.get_children().live().specific()
         return context
 
 
@@ -64,6 +90,12 @@ class Program2021PointPageTag(TaggedItemBase):
     )
 
 
+class Program2021PointPageSearchTag(TaggedItemBase):
+    content_object = ParentalKey(
+        "program2021.Program2021PointPage", on_delete=models.CASCADE
+    )
+
+
 class Program2021PointPage(Page, MetadataPageMixin):
     RICH_TEXT_FEATURES = ["bold", "italic", "ol", "ul", "link", "document-link"]
 
@@ -195,6 +227,20 @@ class Program2021PointPage(Page, MetadataPageMixin):
     )
     owner_url = models.URLField("odkaz na garanta", blank=True, null=True)
     tags = ClusterTaggableManager(through=Program2021PointPageTag, blank=True)
+    search_tags = ClusterTaggableManager("Tagy pro vyhledávání", through=Program2021PointPageSearchTag, blank=True,
+        related_name="search_tags",
+        help_text="""Deleny do skupin se spolecnym prefixem, napr. "gender". Pokud je bod spolecny pro vsechny moznosti dane skupiny, pouzij tag se suffixem "-every".  
+Priklad: chces-li programovy bod pouze pro muze, zadej tag "gender-male", pokud je to jedno, musis zadat tag "gender-every". 
+Pro kazdou skupinu musis zadat aspon jeden tag, jinak se bod nedostane nikdy do vysledku vyhledavani. Seznam tagu po skupinach:
+(gender-male gender-female gender-every) 
+(age-30 age-50 age-65 age-99 age-every) 
+(kids-yes kids-no kids-every)
+(occupation-student occupation-employee-public occupation-employee-private occupation-entrepreneur occupation-maternity occupation-retired occupation-every)
+(wealth-excelent wealth-good wealth-average wealth-bad wealth-every)
+(travel-bike travel-car travel-public travel-every)
+(housing-metropolis housing-town housing-village housing-every) 
+(education-zs education-ss education-maturita education-vs education-every)
+         """)
 
     ### PANELS
 
@@ -204,6 +250,7 @@ class Program2021PointPage(Page, MetadataPageMixin):
                 FieldPanel("public_title"),
                 FieldPanel("annotation"),
                 FieldPanel("tags"),
+                FieldPanel("search_tags"),
                 FieldPanel("problem"),
                 FieldPanel("ideal"),
                 FieldPanel("already_done"),
diff --git a/program2021/templates/program2021/program2021_home_page.html b/program2021/templates/program2021/program2021_home_page.html
index 2fcfe53c3d04bf4489300972b3873b6488a826ea..75863280d38506a3afa786a66af70693a6e92a45 100644
--- a/program2021/templates/program2021/program2021_home_page.html
+++ b/program2021/templates/program2021/program2021_home_page.html
@@ -7,19 +7,20 @@
     <h1>{{ page.headline }}</h1>
     <p class="lead text-muted">{{ page.perex }}</p>
 
-    <form class="text-left mt-5">
+    <form class="text-left mt-5" action="{% pageurl page %}" method="POST">
+      {% csrf_token %}
 
       <div class="row my-3">
         <div class="col-2 text-right">pohlaví:</div>
         <div class="col-4 btn-group btn-group-toggle" data-toggle="buttons">
           <label class="btn btn-outline-secondary">
-            <input type="radio" name="gender" id="gender1" autocomplete="off"> žena
+            <input type="radio" name="gender" id="gender1" value="female" autocomplete="off"> žena
           </label>
           <label class="btn btn-outline-secondary">
-            <input type="radio" name="gender" id="gender2" autocomplete="off"> muž
+            <input type="radio" name="gender" id="gender2" value="male" autocomplete="off"> muž
           </label>
           <label class="btn btn-outline-secondary active">
-            <input type="radio" name="gender" id="gender3" autocomplete="off" checked> jiné / nechci uvést
+            <input type="radio" name="gender" id="gender3" value="" autocomplete="off" checked> jiné / nechci uvést
           </label>
         </div>
       </div>
@@ -28,19 +29,19 @@
         <div class="col-2 text-right">věk:</div>
         <div class="col-6 btn-group btn-group-toggle" data-toggle="buttons">
           <label class="btn btn-outline-secondary active">
-            <input type="radio" name="age" id="age1" autocomplete="off"> do 30 let
+            <input type="radio" name="age" id="age1" value="30" autocomplete="off"> do 30 let
           </label>
           <label class="btn btn-outline-secondary">
-            <input type="radio" name="age" id="age2" autocomplete="off"> 30 - 49 let
+            <input type="radio" name="age" id="age2" value="50" autocomplete="off"> 30 - 49 let
           </label>
           <label class="btn btn-outline-secondary">
-            <input type="radio" name="age" id="age3" autocomplete="off"> 50 - 64 let
+            <input type="radio" name="age" id="age3" value="65" autocomplete="off"> 50 - 64 let
           </label>
           <label class="btn btn-outline-secondary">
-            <input type="radio" name="age" id="age4" autocomplete="off"> 65+ let
+            <input type="radio" name="age" id="age4" value="99" autocomplete="off"> 65+ let
           </label>
           <label class="btn btn-outline-secondary">
-            <input type="radio" name="age" id="age5" autocomplete="off" checked> nechci uvést
+            <input type="radio" name="age" id="age5" value="" autocomplete="off" checked> nechci uvést
           </label>
         </div>
       </div>
@@ -49,13 +50,13 @@
         <div class="col-2 text-right">mám děti:</div>
         <div class="col-3 btn-group btn-group-toggle" data-toggle="buttons">
           <label class="btn btn-outline-secondary">
-            <input type="radio" name="kids" id="kids1" autocomplete="off"> ano
+            <input type="radio" name="kids" id="kids1" value="yes" autocomplete="off"> ano
           </label>
           <label class="btn btn-outline-secondary">
-            <input type="radio" name="kids" id="kids2" autocomplete="off"> ne
+            <input type="radio" name="kids" id="kids2" value="no" autocomplete="off"> ne
           </label>
           <label class="btn btn-outline-secondary active">
-            <input type="radio" name="kids" id="kids3" autocomplete="off" checked> nechci uvést
+            <input type="radio" name="kids" id="kids3" value="" autocomplete="off" checked> nechci uvést
           </label>
         </div>
       </div>
@@ -65,14 +66,14 @@
           <label for="occupation">jsem:</label>
         </div>
         <div class="col-4">
-          <select class="form-control" id="occupation">
-            <option>jiné / nechci uvést</option>
-            <option>student*ka</option>
-            <option>zaměstnanec*kyně ve veřejné sféře</option>
-            <option>zaměstnanec*kyně v soukromé sféře</option>
-            <option>podnikatel*ka</option>
-            <option>na mateřské / rodičovské</option>
-            <option>v důchodu</option>
+          <select class="form-control" id="occupation" name="occupation">
+            <option value="">jiné / nechci uvést</option>
+            <option value="student">student*ka</option>
+            <option value="employee-public">zaměstnanec*kyně ve veřejné sféře</option>
+            <option value="employee-private">zaměstnanec*kyně v soukromé sféře</option>
+            <option value="entrepreneur">podnikatel*ka</option>
+            <option value="maternity">na mateřské / rodičovské</option>
+            <option value="retired">v důchodu</option>
           </select>
         </div>
       </div>
@@ -82,12 +83,12 @@
           <label for="wealth">životní úroveň:</label>
         </div>
         <div class="col-4">
-          <select class="form-control" id="wealth">
-            <option>jiné / nechci uvést</option>
-            <option>velmi dobrá</option>
-            <option>dobrá</option>
-            <option>ani dobrá, ani špatná</option>
-            <option>špatná</option>
+          <select class="form-control" id="wealth" name="wealth">
+            <option value="">jiné / nechci uvést</option>
+            <option value="excelent">velmi dobrá</option>
+            <option value="good">dobrá</option>
+            <option value="average">ani dobrá, ani špatná</option>
+            <option value="bad">špatná</option>
           </select>
         </div>
       </div>
@@ -98,15 +99,15 @@
         </div>
         <div class="col-4">
           <div class="custom-control custom-checkbox">
-            <input type="checkbox" class="custom-control-input" id="travel1">
+            <input type="checkbox" class="custom-control-input" id="travel1" name="travel-bike">
             <label class="custom-control-label" for="travel1">na kole</label>
           </div>
           <div class="custom-control custom-checkbox">
-            <input type="checkbox" class="custom-control-input" id="travel2">
+            <input type="checkbox" class="custom-control-input" id="travel2" name="travel-car">
             <label class="custom-control-label" for="travel2">autem</label>
           </div>
           <div class="custom-control custom-checkbox">
-            <input type="checkbox" class="custom-control-input" id="travel3">
+            <input type="checkbox" class="custom-control-input" id="travel3" name="travel-public">
             <label class="custom-control-label" for="travel3">veřejnou dopravou</label>
           </div>
         </div>
@@ -117,11 +118,11 @@
           <label for="housing">bydlím:</label>
         </div>
         <div class="col-4">
-          <select class="form-control" id="housing">
-            <option>jiné / nechci uvést</option>
-            <option>ve velkém městě nebo jeho okolí</option>
-            <option>ve středně velkém městě (10 - 50 tis.)</option>
-            <option>v malém městě nebo na vesnici</option>
+          <select class="form-control" id="housing" name="housing">
+            <option value="">jiné / nechci uvést</option>
+            <option value="metropolis">ve velkém městě nebo jeho okolí</option>
+            <option value="town">ve středně velkém městě (10 - 50 tis.)</option>
+            <option value="village">v malém městě nebo na vesnici</option>
           </select>
         </div>
       </div>
@@ -130,23 +131,31 @@
         <div class="col-2 text-right">vzdělání:</div>
         <div class="col-6 btn-group btn-group-toggle" data-toggle="buttons">
           <label class="btn btn-outline-secondary">
-            <input type="radio" name="education" id="education1" autocomplete="off"> ZŠ
+            <input type="radio" name="education" id="education1" value="zs" autocomplete="off"> ZŠ
           </label>
           <label class="btn btn-outline-secondary">
-            <input type="radio" name="education" id="education2" autocomplete="off"> SŠ bez maturity
+            <input type="radio" name="education" id="education2" value="ss" autocomplete="off"> SŠ bez maturity
           </label>
           <label class="btn btn-outline-secondary">
-            <input type="radio" name="education" id="education3" autocomplete="off"> SŠ s maturitou
+            <input type="radio" name="education" id="education3" value="maturita" autocomplete="off"> SŠ s maturitou
           </label>
           <label class="btn btn-outline-secondary">
-            <input type="radio" name="education" id="education4" autocomplete="off"> VŠ
+            <input type="radio" name="education" id="education4" value="vs" autocomplete="off"> VŠ
           </label>
           <label class="btn btn-outline-secondary active">
-            <input type="radio" name="education" id="education5" autocomplete="off" checked> nechci uvést
+            <input type="radio" name="education" id="education5" value="" autocomplete="off" checked> nechci uvést
           </label>
         </div>
       </div>
 
+      <div class="row form-group">
+        <div class="col-2">
+        </div>
+        <div class="col-4">
+          <input type="submit" value="Vyhledat">
+        </div>
+      </div>
+
     </form>
 
   </div>