Load very long (25 sec) since I use Conditional fields
-
[number age min:3 max:75 "18"] [group grp_activites_adulte]
[group grp_activite_adulte_1] <label id="lbl_activite_adulte_1">Activité adulte 1</label> [checkbox chk_activite_adulte_1 id:chk_activite_adulte_1 "activités adultes"] [/group] [group grp_activite_adulte_2] <label id="lbl_activite_adulte_2">Activité adulte 2</label> [checkbox chk_activite_adulte_2 id:chk_activite_adulte_2 "activités adultes"] [/group] [group grp_activite_adulte_3] <label id="lbl_activite_adulte_3">Activité adulte 3</label> [checkbox chk_activite_adulte_3 id:chk_activite_adulte_3 "activités adultes"] [/group] [group grp_activite_adulte_4] <label id="lbl_activite_adulte_4">Activité adulte 4</label> [checkbox chk_activite_adulte_4 id:chk_activite_adulte_4 "activités adultes"] [/group] [group grp_activite_adulte_5] <label id="lbl_activite_adulte_5">Activité adulte 5</label> [checkbox chk_activite_adulte_5 id:chk_activite_adulte_5 "activités adultes"] [/group] [group grp_activite_adulte_6] <label id="lbl_activite_adulte_6">Activité adulte 6</label> [checkbox chk_activite_adulte_6 id:chk_activite_adulte_6 "activités adultes"] [/group] [group grp_activite_adulte_7] <label id="lbl_activite_adulte_7">Activité adulte 7</label> [checkbox chk_activite_adulte_7 id:chk_activite_adulte_7 "activités adultes"] [/group] [group grp_activite_adulte_8] <label id="lbl_activite_adulte_8">Activité adulte 8</label> [checkbox chk_activite_adulte_8 id:chk_activite_adulte_8 "activités adultes"] [/group] [group grp_activite_adulte_9] <label id="lbl_activite_adulte_9">Activité adulte 9</label> [checkbox chk_activite_adulte_9 id:chk_activite_adulte_9 "activités adultes"] [/group] [group grp_activite_adulte_10] <label id="lbl_activite_adulte_10">Activité adulte 10</label> [checkbox chk_activite_adulte_10 id:chk_activite_adulte_10 "activités adultes"] [/group] [group grp_activite_adulte_11] <label id="lbl_activite_adulte_11">Activité adulte 11</label> [checkbox chk_activite_adulte_11 id:chk_activite_adulte_11 "activités adultes"] [/group] [group grp_activite_adulte_12] <label id="lbl_activite_adulte_12">Activité adulte 12</label> [checkbox chk_activite_adulte_12 id:chk_activite_adulte_12 "activités adultes"] [/group] [group grp_activite_adulte_13] <label id="lbl_activite_adulte_13">Activité adulte 13</label> [checkbox chk_activite_adulte_13 id:chk_activite_adulte_13 "activités adultes"] [/group] [group grp_activite_adulte_14] <label id="lbl_activite_adulte_14">Activité adulte 14</label> [checkbox chk_activite_adulte_14 id:chk_activite_adulte_14 "activités adultes"] [/group] [group grp_activite_adulte_15] <label id="lbl_activite_adulte_15">Activité adulte 15</label> [checkbox chk_activite_adulte_15 id:chk_activite_adulte_15 "activités adultes"] [/group] [/group] [group grp_activites_enfant_3-6]
[group grp_activite_enfant_3-6_1] <label id="lbl_activite_enfant_3-6_1">Activité enfant 3-6 1</label> [checkbox chk_activite_enfant_3-6_1 id:chk_activite_enfant_3-6_1 "activités enfant 3-6"] [/group] [group grp_activite_enfant_3-6_2] <label id="lbl_activite_enfant_3-6_2">Activité enfant 3-6 2</label> [checkbox chk_activite_enfant_3-6_2 id:chk_activite_enfant_3-6_2 "activités enfant 3-6"] [/group] [group grp_activite_enfant_3-6_3] <label id="lbl_activite_enfant_3-6_3">Activité enfant 3-6 3</label> [checkbox chk_activite_enfant_3-6_3 id:chk_activite_enfant_3-6_3 "activités enfant 3-6"] [/group] [group grp_activite_enfant_3-6_4] <label id="lbl_activite_enfant_3-6_4">Activité enfant 3-6 4</label> [checkbox chk_activite_enfant_3-6_4 id:chk_activite_enfant_3-6_4 "activités enfant 3-6"] [/group] [group grp_activite_enfant_3-6_5] <label id="lbl_activite_enfant_3-6_5">Activité enfant 3-6 5</label> [checkbox chk_activite_enfant_3-6_5 id:chk_activite_enfant_3-6_5 "activités enfant 3-6"] [/group] [/group] [group grp_activites_enfant_4-6]
[group grp_activite_enfant_4-6_1] <label id="lbl_activite_enfant_4-6_1">Activité enfant 4-6 1</label> [checkbox chk_activite_enfant_4-6_1 id:chk_activite_enfant_4-6_1 "activités enfant 4-6"] [/group] [group grp_activite_enfant_4-6_2] <label id="lbl_activite_enfant_4-6_2">Activité enfant 4-6 2</label> [checkbox chk_activite_enfant_4-6_2 id:chk_activite_enfant_4-6_2 "activités enfant 4-6"] [/group] [group grp_activite_enfant_4-6_3] <label id="lbl_activite_enfant_4-6_3">Activité enfant 4-6 3</label> [checkbox chk_activite_enfant_4-6_3 id:chk_activite_enfant_4-6_3 "activités enfant 4-6"] [/group] [group grp_activite_enfant_4-6_4] <label id="lbl_activite_enfant_4-6_4">Activité enfant 4-6 4</label> [checkbox chk_activite_enfant_4-6_4 id:chk_activite_enfant_4-6_4 "activités enfant 4-6"] [/group] [group grp_activite_enfant_4-6_5] <label id="lbl_activite_enfant_4-6_5">Activité enfant 4-6 5</label> [checkbox chk_activite_enfant_4-6_5 id:chk_activite_enfant_4-6_5 "activités enfant 4-6"] [/group] [/group] [group grp_activites_enfant_5-9]
[group grp_activite_enfant_5-9_1] <label id="lbl_activite_enfant_5-9_1">Activité enfant 5-9 1</label> [checkbox chk_activite_enfant_5-9_1 id:chk_activite_enfant_5-9_1 "activités enfant 5-9"] [/group] [group grp_activite_enfant_5-9_2] <label id="lbl_activite_enfant_5-9_2">Activité enfant 5-9 2</label> [checkbox chk_activite_enfant_5-9_2 id:chk_activite_enfant_5-9_2 "activités enfant 5-9"] [/group] [group grp_activite_enfant_5-9_3] <label id="lbl_activite_enfant_5-9_3">Activité enfant 5-9 3</label> [checkbox chk_activite_enfant_5-9_3 id:chk_activite_enfant_5-9_3 "activités enfant 5-9"] [/group] [group grp_activite_enfant_5-9_4] <label id="lbl_activite_enfant_5-9_4">Activité enfant 5-9 4</label> [checkbox chk_activite_enfant_5-9_4 id:chk_activite_enfant_5-9_4 "activités enfant 5-9"] [/group] [group grp_activite_enfant_5-9_5] <label id="lbl_activite_enfant_5-9_5">Activité enfant 5-9 5</label> [checkbox chk_activite_enfant_5-9_5 id:chk_activite_enfant_5-9_5 "activités enfant 5-9"] [/group] [/group] [group grp_activites_enfant_5-11]
[group grp_activite_enfant_5-11_1] <label id="lbl_activite_enfant_5-11_1">Activité enfant 5-11 1</label> [checkbox chk_activite_enfant_5-11_1 id:chk_activite_enfant_5-11_1 "activités enfant 5-11"] [/group] [group grp_activite_enfant_5-11_2] <label id="lbl_activite_enfant_5-11_2">Activité enfant 5-11 2</label> [checkbox chk_activite_enfant_5-11_2 id:chk_activite_enfant_5-11_2 "activités enfant 5-11"] [/group] [group grp_activite_enfant_5-11_3] <label id="lbl_activite_enfant_5-11_3">Activité enfant 5-11 3</label> [checkbox chk_activite_enfant_5-11_3 id:chk_activite_enfant_5-11_3 "activités enfant 5-11"] [/group] [group grp_activite_enfant_5-11_4] <label id="lbl_activite_enfant_5-11_4">Activité enfant 5-11 4</label> [checkbox chk_activite_enfant_5-11_4 id:chk_activite_enfant_5-11_4 "activités enfant 5-11"] [/group] [group grp_activite_enfant_5-11_5] <label id="lbl_activite_enfant_5-11_5">Activité enfant 5-11 5</label> [checkbox chk_activite_enfant_5-11_5 id:chk_activite_enfant_5-11_5 "activités enfant 5-11"] [/group] [/group] [group grp_activites_enfant_8-11]
[group grp_activite_enfant_8-11_1] <label id="lbl_activite_enfant_8-11_1">Activité enfant 8-11 1</label> [checkbox chk_activite_enfant_8-11_1 id:chk_activite_enfant_8-11_1 "activités enfant 8-11"] [/group] [group grp_activite_enfant_8-11_2] <label id="lbl_activite_enfant_8-11_2">Activité enfant 8-11 2</label> [checkbox chk_activite_enfant_8-11_2 id:chk_activite_enfant_8-11_2 "activités enfant 8-11"] [/group] [group grp_activite_enfant_8-11_3] <label id="lbl_activite_enfant_8-11_3">Activité enfant 8-11 3</label> [checkbox chk_activite_enfant_8-11_3 id:chk_activite_enfant_8-11_3 "activités enfant 8-11"] [/group] [group grp_activite_enfant_8-11_4] <label id="lbl_activite_enfant_8-11_4">Activité enfant 8-11 4</label> [checkbox chk_activite_enfant_8-11_4 id:chk_activite_enfant_8-11_4 "activités enfant 8-11"] [/group] [group grp_activite_enfant_8-11_5] <label id="lbl_activite_enfant_8-11_5">Activité enfant 8-11 5</label> [checkbox chk_activite_enfant_8-11_5 id:chk_activite_enfant_8-11_5 "activités enfant 8-11"] [/group] [/group] [group grp_activites_enfant_10-15]
[group grp_activite_enfant_10-15_1] <label id="lbl_activite_enfant_10-15_1">Activité enfant 10-15 1</label> [checkbox chk_activite_enfant_10-15_1 id:chk_activite_enfant_10-15_1 "activités enfant 10-15"] [/group] [group grp_activite_enfant_10-15_2] <label id="lbl_activite_enfant_10-15_2">Activité enfant 10-15 2</label> [checkbox chk_activite_enfant_10-15_2 id:chk_activite_enfant_10-15_2 "activités enfant 10-15"] [/group] [group grp_activite_enfant_10-15_3] <label id="lbl_activite_enfant_10-15_3">Activité enfant 10-15 3</label> [checkbox chk_activite_enfant_10-15_3 id:chk_activite_enfant_10-15_3 "activités enfant 10-15"] [/group] [group grp_activite_enfant_10-15_4] <label id="lbl_activite_enfant_10-15_4">Activité enfant 10-15 4</label> [checkbox chk_activite_enfant_10-15_4 id:chk_activite_enfant_10-15_4 "activités enfant 10-15"] [/group] [group grp_activite_enfant_10-15_5] <label id="lbl_activite_enfant_10-15_5">Activité enfant 10-15 5</label> [checkbox chk_activite_enfant_10-15_5 id:chk_activite_enfant_10-15_5 "activités enfant 10-15"] [/group] [/group] [group grp_activites_enfant_15-19]
[group grp_activite_enfant_15-19_1] <label id="lbl_activite_enfant_15-19_1">Activité enfant 15-19 1</label> [checkbox chk_activite_enfant_15-19_1 id:chk_activite_enfant_15-19_1 "activités enfant 15-19"] [/group] [group grp_activite_enfant_15-19_2] <label id="lbl_activite_enfant_15-19_2">Activité enfant 15-19 2</label> [checkbox chk_activite_enfant_15-19_2 id:chk_activite_enfant_15-19_2 "activités enfant 15-19"] [/group] [group grp_activite_enfant_15-19_3] <label id="lbl_activite_enfant_15-19_3">Activité enfant 15-19 3</label> [checkbox chk_activite_enfant_15-19_3 id:chk_activite_enfant_15-19_3 "activités enfant 15-19"] [/group] [group grp_activite_enfant_15-19_4] <label id="lbl_activite_enfant_15-19_4">Activité enfant 15-19 4</label> [checkbox chk_activite_enfant_15-19_4 id:chk_activite_enfant_15-19_4 "activités enfant 15-19"] [/group] [group grp_activite_enfant_15-19_5] <label id="lbl_activite_enfant_15-19_5">Activité enfant 15-19 5</label> [checkbox chk_activite_enfant_15-19_5 id:chk_activite_enfant_15-19_5 "activités enfant 15-19"] [/group] [/group] [hidden nb_activites_adulte] [cf7-recordset id="nb_activites_adulte" type="database" query="SELECT COUNT(DISTINCT(activite)) as nb_activites_adulte FROM mf_activites_liste_2023_2024 WHERE age_min = 17;"] [cf7-link-field recordset="nb_activites_adulte" field="nb_activites_adulte" value="nb_activites_adulte"] [cf7-recordset id="activites_adulte" type="database" query="SELECT @row_number:=CASE WHEN @activite_id != activite OR @row_number = 0 THEN @row_number + 1 ELSE @row_number END AS id, @activite_id:=activite Activite, tarif FROM mf_activites_liste_2023_2024, (SELECT @activite_id:=0,@row_number:=0) as t WHERE age_min = 17 GROUP BY activite ORDER BY activite;"] [cf7-recordset id="horaires_adulte" type="database" query="SELECT @row_number:=CASE WHEN @activite_id != activite OR @row_number = 0 THEN @row_number + 1 ELSE @row_number END AS id, CASE WHEN horaire LIKE 'Lundi%' THEN 1 WHEN horaire LIKE 'Mardi%' THEN 2 WHEN horaire LIKE 'Mercredi%' THEN 3 WHEN horaire LIKE 'Jeudi%' THEN 4 WHEN horaire LIKE 'Vendredi%' THEN 5 WHEN horaire LIKE 'Samedi%' THEN 6 WHEN horaire LIKE 'Dimanche%' THEN 7 END as jour_semaine, @activite_id:=activite Activite, horaire, tarif, age_min, age_max, autorisation_parentale, nb_places, intervenant FROM mf_activites_liste_2023_2024, (SELECT @activite_id:=0,@row_number:=0) as t WHERE age_min = 17 ORDER BY activite, jour_semaine;"] [cf7-link-field recordset="activites_adulte" field="lbl_activite_adulte_1" value="{template.activite}" condition="record['id'] == 1"] [cf7-link-field recordset="horaires_adulte" field="chk_activite_adulte_1" value="" text="{template.horaire}" condition="record['id'] == 1"] [cf7-link-field recordset="activites_adulte" field="lbl_activite_adulte_2" value="{template.activite}" condition="record['id'] == 2"] [cf7-link-field recordset="horaires_adulte" field="chk_activite_adulte_2" value="" text="{template.horaire}" condition="record['id'] == 2"] [cf7-link-field recordset="activites_adulte" field="lbl_activite_adulte_3" value="{template.activite}" condition="record['id'] == 3"] [cf7-link-field recordset="horaires_adulte" field="chk_activite_adulte_3" value="" text="{template.horaire}" condition="record['id'] == 3"] [cf7-link-field recordset="activites_adulte" field="lbl_activite_adulte_4" value="{template.activite}" condition="record['id'] == 4"] [cf7-link-field recordset="horaires_adulte" field="chk_activite_adulte_4" value="" text="{template.horaire}" condition="record['id'] == 4"] [cf7-link-field recordset="activites_adulte" field="lbl_activite_adulte_5" value="{template.activite}" condition="record['id'] == 5"] [cf7-link-field recordset="horaires_adulte" field="chk_activite_adulte_5" value="" text="{template.horaire}" condition="record['id'] == 5"] [cf7-link-field recordset="activites_adulte" field="lbl_activite_adulte_6" value="{template.activite}" condition="record['id'] == 6"] [cf7-link-field recordset="horaires_adulte" field="chk_activite_adulte_6" value="" text="{template.horaire}" condition="record['id'] == 6"] [cf7-link-field recordset="activites_adulte" field="lbl_activite_adulte_7" value="{template.activite}" condition="record['id'] == 7"] [cf7-link-field recordset="horaires_adulte" field="chk_activite_adulte_7" value="" text="{template.horaire}" condition="record['id'] == 7"] [cf7-link-field recordset="activites_adulte" field="lbl_activite_adulte_8" value="{template.activite}" condition="record['id'] == 8"] [cf7-link-field recordset="horaires_adulte" field="chk_activite_adulte_8" value="" text="{template.horaire}" condition="record['id'] == 8"] [cf7-link-field recordset="activites_adulte" field="lbl_activite_adulte_9" value="{template.activite}" condition="record['id'] == 9"] [cf7-link-field recordset="horaires_adulte" field="chk_activite_adulte_9" value="" text="{template.horaire}" condition="record['id'] == 9"] [cf7-link-field recordset="activites_adulte" field="lbl_activite_adulte_10" value="{template.activite}" condition="record['id'] == 10"] [cf7-link-field recordset="horaires_adulte" field="chk_activite_adulte_10" value="" text="{template.horaire}" condition="record['id'] == 10"] [cf7-link-field recordset="activites_adulte" field="lbl_activite_adulte_11" value="{template.activite}" condition="record['id'] == 11"] [cf7-link-field recordset="horaires_adulte" field="chk_activite_adulte_11" value="" text="{template.horaire}" condition="record['id'] == 11"] [cf7-link-field recordset="activites_adulte" field="lbl_activite_adulte_12" value="{template.activite}" condition="record['id'] == 12"] [cf7-link-field recordset="horaires_adulte" field="chk_activite_adulte_12" value="" text="{template.horaire}" condition="record['id'] == 12"] [cf7-link-field recordset="activites_adulte" field="lbl_activite_adulte_13" value="{template.activite}" condition="record['id'] == 13"] [cf7-link-field recordset="horaires_adulte" field="chk_activite_adulte_13" value="" text="{template.horaire}" condition="record['id'] == 13"] [cf7-link-field recordset="activites_adulte" field="lbl_activite_adulte_14" value="{template.activite}" condition="record['id'] == 14"] [cf7-link-field recordset="horaires_adulte" field="chk_activite_adulte_14" value="" text="{template.horaire}" condition="record['id'] == 14"] [cf7-link-field recordset="activites_adulte" field="lbl_activite_adulte_15" value="{template.activite}" condition="record['id'] == 15"] [cf7-link-field recordset="horaires_adulte" field="chk_activite_adulte_15" value="" text="{template.horaire}" condition="record['id'] == 15"] [hidden nb_activites_enfant_3-6] [cf7-recordset id="nb_activites_enfant_3-6" type="database" query="SELECT COUNT(DISTINCT(activite)) as 'nb_activites_enfant_3-6' FROM mf_activites_liste_2023_2024 WHERE age_min = 3 AND age_max = 6;"] [cf7-link-field recordset="nb_activites_enfant_3-6" field="nb_activites_enfant_3-6" value="nb_activites_enfant_3-6"] [cf7-recordset id="activites_enfant_3-6" type="database" query="SELECT @row_number:=CASE WHEN @activite_id != activite OR @row_number = 0 THEN @row_number + 1 ELSE @row_number END AS id, @activite_id:=activite Activite, tarif FROM mf_activites_liste_2023_2024, (SELECT @activite_id:=0,@row_number:=0) as t WHERE age_min = 3 AND age_max = 6 GROUP BY activite ORDER BY activite;"] [cf7-recordset id="horaires_enfant_3-6" type="database" query="SELECT @row_number:=CASE WHEN @activite_id != activite OR @row_number = 0 THEN @row_number + 1 ELSE @row_number END AS id, CASE WHEN horaire LIKE 'Lundi%' THEN 1 WHEN horaire LIKE 'Mardi%' THEN 2 WHEN horaire LIKE 'Mercredi%' THEN 3 WHEN horaire LIKE 'Jeudi%' THEN 4 WHEN horaire LIKE 'Vendredi%' THEN 5 WHEN horaire LIKE 'Samedi%' THEN 6 WHEN horaire LIKE 'Dimanche%' THEN 7 END as jour_semaine, @activite_id:=activite Activite, horaire, tarif, age_min, age_max, autorisation_parentale, nb_places, intervenant FROM mf_activites_liste_2023_2024, (SELECT @activite_id:=0,@row_number:=0) as t WHERE age_min = 3 AND age_max = 6 ORDER BY activite, jour_semaine;"] [cf7-link-field recordset="activites_enfant_3-6" field="lbl_activite_enfant_3-6_1" value="{template.activite}" condition="record['id'] == 1"] [cf7-link-field recordset="horaires_enfant_3-6" field="chk_activite_enfant_3-6_1" value="" text="{template.horaire}" condition="record['id'] == 1"] [cf7-link-field recordset="activites_enfant_3-6" field="lbl_activite_enfant_3-6_2" value="{template.activite}" condition="record['id'] == 2"] [cf7-link-field recordset="horaires_enfant_3-6" field="chk_activite_enfant_3-6_2" value="" text="{template.horaire}" condition="record['id'] == 2"] [cf7-link-field recordset="activites_enfant_3-6" field="lbl_activite_enfant_3-6_3" value="{template.activite}" condition="record['id'] == 3"] [cf7-link-field recordset="horaires_enfant_3-6" field="chk_activite_enfant_3-6_3" value="" text="{template.horaire}" condition="record['id'] == 3"] [cf7-link-field recordset="activites_enfant_3-6" field="lbl_activite_enfant_3-6_4" value="{template.activite}" condition="record['id'] == 4"] [cf7-link-field recordset="horaires_enfant_3-6" field="chk_activite_enfant_3-6_4" value="" text="{template.horaire}" condition="record['id'] == 4"] [cf7-link-field recordset="activites_enfant_3-6" field="lbl_activite_enfant_3-6_5" value="{template.activite}" condition="record['id'] == 5"] [cf7-link-field recordset="horaires_enfant_3-6" field="chk_activite_enfant_3-6_5" value="" text="{template.horaire}" condition="record['id'] == 5"] [hidden nb_activites_enfant_4-6] [cf7-recordset id="nb_activites_enfant_4-6" type="database" query="SELECT COUNT(DISTINCT(activite)) as 'nb_activites_enfant_4-6' FROM mf_activites_liste_2023_2024 WHERE age_min = 4 AND age_max = 6;"] [cf7-link-field recordset="nb_activites_enfant_4-6" field="nb_activites_enfant_4-6" value="nb_activites_enfant_4-6"] [cf7-recordset id="activites_enfant_4-6" type="database" query="SELECT @row_number:=CASE WHEN @activite_id != activite OR @row_number = 0 THEN @row_number + 1 ELSE @row_number END AS id, @activite_id:=activite Activite, tarif FROM mf_activites_liste_2023_2024, (SELECT @activite_id:=0,@row_number:=0) as t WHERE age_min = 4 AND age_max = 6 GROUP BY activite ORDER BY activite;"] [cf7-recordset id="horaires_enfant_4-6" type="database" query="SELECT @row_number:=CASE WHEN @activite_id != activite OR @row_number = 0 THEN @row_number + 1 ELSE @row_number END AS id, CASE WHEN horaire LIKE 'Lundi%' THEN 1 WHEN horaire LIKE 'Mardi%' THEN 2 WHEN horaire LIKE 'Mercredi%' THEN 3 WHEN horaire LIKE 'Jeudi%' THEN 4 WHEN horaire LIKE 'Vendredi%' THEN 5 WHEN horaire LIKE 'Samedi%' THEN 6 WHEN horaire LIKE 'Dimanche%' THEN 7 END as jour_semaine, @activite_id:=activite Activite, horaire, tarif, age_min, age_max, autorisation_parentale, nb_places, intervenant FROM mf_activites_liste_2023_2024, (SELECT @activite_id:=0,@row_number:=0) as t WHERE age_min = 4 AND age_max = 6 ORDER BY activite, jour_semaine;"] [cf7-link-field recordset="activites_enfant_4-6" field="lbl_activite_enfant_4-6_1" value="{template.activite}" condition="record['id'] == 1"] [cf7-link-field recordset="horaires_enfant_4-6" field="chk_activite_enfant_4-6_1" value="" text="{template.horaire}" condition="record['id'] == 1"] [cf7-link-field recordset="activites_enfant_4-6" field="lbl_activite_enfant_4-6_2" value="{template.activite}" condition="record['id'] == 2"] [cf7-link-field recordset="horaires_enfant_4-6" field="chk_activite_enfant_4-6_2" value="" text="{template.horaire}" condition="record['id'] == 2"] [cf7-link-field recordset="activites_enfant_4-6" field="lbl_activite_enfant_4-6_3" value="{template.activite}" condition="record['id'] == 3"] [cf7-link-field recordset="horaires_enfant_4-6" field="chk_activite_enfant_4-6_3" value="" text="{template.horaire}" condition="record['id'] == 3"] [cf7-link-field recordset="activites_enfant_4-6" field="lbl_activite_enfant_4-6_4" value="{template.activite}" condition="record['id'] == 4"] [cf7-link-field recordset="horaires_enfant_4-6" field="chk_activite_enfant_4-6_4" value="" text="{template.horaire}" condition="record['id'] == 4"] [cf7-link-field recordset="activites_enfant_4-6" field="lbl_activite_enfant_4-6_5" value="{template.activite}" condition="record['id'] == 5"] [cf7-link-field recordset="horaires_enfant_4-6" field="chk_activite_enfant_4-6_5" value="" text="{template.horaire}" condition="record['id'] == 5"] [hidden nb_activites_enfant_5-9] [cf7-recordset id="nb_activites_enfant_5-9" type="database" query="SELECT COUNT(DISTINCT(activite)) as 'nb_activites_enfant_5-9' FROM mf_activites_liste_2023_2024 WHERE age_min = 5 AND age_max = 9;"] [cf7-link-field recordset="nb_activites_enfant_5-9" field="nb_activites_enfant_5-9" value="nb_activites_enfant_5-9"] [cf7-recordset id="activites_enfant_5-9" type="database" query="SELECT @row_number:=CASE WHEN @activite_id != activite OR @row_number = 0 THEN @row_number + 1 ELSE @row_number END AS id, @activite_id:=activite Activite, tarif FROM mf_activites_liste_2023_2024, (SELECT @activite_id:=0,@row_number:=0) as t WHERE age_min = 5 AND age_max = 9 GROUP BY activite ORDER BY activite;"] [cf7-recordset id="horaires_enfant_5-9" type="database" query="SELECT @row_number:=CASE WHEN @activite_id != activite OR @row_number = 0 THEN @row_number + 1 ELSE @row_number END AS id, CASE WHEN horaire LIKE 'Lundi%' THEN 1 WHEN horaire LIKE 'Mardi%' THEN 2 WHEN horaire LIKE 'Mercredi%' THEN 3 WHEN horaire LIKE 'Jeudi%' THEN 4 WHEN horaire LIKE 'Vendredi%' THEN 5 WHEN horaire LIKE 'Samedi%' THEN 6 WHEN horaire LIKE 'Dimanche%' THEN 7 END as jour_semaine, @activite_id:=activite Activite, horaire, tarif, age_min, age_max, autorisation_parentale, nb_places, intervenant FROM mf_activites_liste_2023_2024, (SELECT @activite_id:=0,@row_number:=0) as t WHERE age_min = 5 AND age_max = 9 ORDER BY activite, jour_semaine;"] [cf7-link-field recordset="activites_enfant_5-9" field="lbl_activite_enfant_5-9_1" value="{template.activite}" condition="record['id'] == 1"] [cf7-link-field recordset="horaires_enfant_5-9" field="chk_activite_enfant_5-9_1" value="" text="{template.horaire}" condition="record['id'] == 1"] [cf7-link-field recordset="activites_enfant_5-9" field="lbl_activite_enfant_5-9_2" value="{template.activite}" condition="record['id'] == 2"] [cf7-link-field recordset="horaires_enfant_5-9" field="chk_activite_enfant_5-9_2" value="" text="{template.horaire}" condition="record['id'] == 2"] [cf7-link-field recordset="activites_enfant_5-9" field="lbl_activite_enfant_5-9_3" value="{template.activite}" condition="record['id'] == 3"] [cf7-link-field recordset="horaires_enfant_5-9" field="chk_activite_enfant_5-9_3" value="" text="{template.horaire}" condition="record['id'] == 3"] [cf7-link-field recordset="activites_enfant_5-9" field="lbl_activite_enfant_5-9_4" value="{template.activite}" condition="record['id'] == 4"] [cf7-link-field recordset="horaires_enfant_5-9" field="chk_activite_enfant_5-9_4" value="" text="{template.horaire}" condition="record['id'] == 4"] [cf7-link-field recordset="activites_enfant_5-9" field="lbl_activite_enfant_5-9_5" value="{template.activite}" condition="record['id'] == 5"] [cf7-link-field recordset="horaires_enfant_5-9" field="chk_activite_enfant_5-9_5" value="" text="{template.horaire}" condition="record['id'] == 5"] [hidden nb_activites_enfant_5-11] [cf7-recordset id="nb_activites_enfant_5-11" type="database" query="SELECT COUNT(DISTINCT(activite)) as 'nb_activites_enfant_5-11' FROM mf_activites_liste_2023_2024 WHERE age_min = 5 AND age_max = 11;"] [cf7-link-field recordset="nb_activites_enfant_5-11" field="nb_activites_enfant_5-11" value="nb_activites_enfant_5-11"] [cf7-recordset id="activites_enfant_5-11" type="database" query="SELECT @row_number:=CASE WHEN @activite_id != activite OR @row_number = 0 THEN @row_number + 1 ELSE @row_number END AS id, @activite_id:=activite Activite, tarif FROM mf_activites_liste_2023_2024, (SELECT @activite_id:=0,@row_number:=0) as t WHERE age_min = 5 AND age_max = 11 GROUP BY activite ORDER BY activite;"] [cf7-recordset id="horaires_enfant_5-11" type="database" query="SELECT @row_number:=CASE WHEN @activite_id != activite OR @row_number = 0 THEN @row_number + 1 ELSE @row_number END AS id, CASE WHEN horaire LIKE 'Lundi%' THEN 1 WHEN horaire LIKE 'Mardi%' THEN 2 WHEN horaire LIKE 'Mercredi%' THEN 3 WHEN horaire LIKE 'Jeudi%' THEN 4 WHEN horaire LIKE 'Vendredi%' THEN 5 WHEN horaire LIKE 'Samedi%' THEN 6 WHEN horaire LIKE 'Dimanche%' THEN 7 END as jour_semaine, @activite_id:=activite Activite, horaire, tarif, age_min, age_max, autorisation_parentale, nb_places, intervenant FROM mf_activites_liste_2023_2024, (SELECT @activite_id:=0,@row_number:=0) as t WHERE age_min = 5 AND age_max = 11 ORDER BY activite, jour_semaine;"] [cf7-link-field recordset="activites_enfant_5-11" field="lbl_activite_enfant_5-11_1" value="{template.activite}" condition="record['id'] == 1"] [cf7-link-field recordset="horaires_enfant_5-11" field="chk_activite_enfant_5-11_1" value="" text="{template.horaire}" condition="record['id'] == 1"] [cf7-link-field recordset="activites_enfant_5-11" field="lbl_activite_enfant_5-11_2" value="{template.activite}" condition="record['id'] == 2"] [cf7-link-field recordset="horaires_enfant_5-11" field="chk_activite_enfant_5-11_2" value="" text="{template.horaire}" condition="record['id'] == 2"] [cf7-link-field recordset="activites_enfant_5-11" field="lbl_activite_enfant_5-11_3" value="{template.activite}" condition="record['id'] == 3"] [cf7-link-field recordset="horaires_enfant_5-11" field="chk_activite_enfant_5-11_3" value="" text="{template.horaire}" condition="record['id'] == 3"] [cf7-link-field recordset="activites_enfant_5-11" field="lbl_activite_enfant_5-11_4" value="{template.activite}" condition="record['id'] == 4"] [cf7-link-field recordset="horaires_enfant_5-11" field="chk_activite_enfant_5-11_4" value="" text="{template.horaire}" condition="record['id'] == 4"] [cf7-link-field recordset="activites_enfant_5-11" field="lbl_activite_enfant_5-11_5" value="{template.activite}" condition="record['id'] == 5"] [cf7-link-field recordset="horaires_enfant_5-11" field="chk_activite_enfant_5-11_5" value="" text="{template.horaire}" condition="record['id'] == 5"] [hidden nb_activites_enfant_8-11] [cf7-recordset id="nb_activites_enfant_8-11" type="database" query="SELECT COUNT(DISTINCT(activite)) as 'nb_activites_enfant_8-11' FROM mf_activites_liste_2023_2024 WHERE age_min = 8 AND age_max = 11;"] [cf7-link-field recordset="nb_activites_enfant_8-11" field="nb_activites_enfant_8-11" value="nb_activites_enfant_8-11"] [cf7-recordset id="activites_enfant_8-11" type="database" query="SELECT @row_number:=CASE WHEN @activite_id != activite OR @row_number = 0 THEN @row_number + 1 ELSE @row_number END AS id, @activite_id:=activite Activite, tarif FROM mf_activites_liste_2023_2024, (SELECT @activite_id:=0,@row_number:=0) as t WHERE age_min = 8 AND age_max = 11 GROUP BY activite ORDER BY activite;"] [cf7-recordset id="horaires_enfant_8-11" type="database" query="SELECT @row_number:=CASE WHEN @activite_id != activite OR @row_number = 0 THEN @row_number + 1 ELSE @row_number END AS id, CASE WHEN horaire LIKE 'Lundi%' THEN 1 WHEN horaire LIKE 'Mardi%' THEN 2 WHEN horaire LIKE 'Mercredi%' THEN 3 WHEN horaire LIKE 'Jeudi%' THEN 4 WHEN horaire LIKE 'Vendredi%' THEN 5 WHEN horaire LIKE 'Samedi%' THEN 6 WHEN horaire LIKE 'Dimanche%' THEN 7 END as jour_semaine, @activite_id:=activite Activite, horaire, tarif, age_min, age_max, autorisation_parentale, nb_places, intervenant FROM mf_activites_liste_2023_2024, (SELECT @activite_id:=0,@row_number:=0) as t WHERE age_min = 8 AND age_max = 11 ORDER BY activite, jour_semaine;"] [cf7-link-field recordset="activites_enfant_8-11" field="lbl_activite_enfant_8-11_1" value="{template.activite}" condition="record['id'] == 1"] [cf7-link-field recordset="horaires_enfant_8-11" field="chk_activite_enfant_8-11_1" value="" text="{template.horaire}" condition="record['id'] == 1"] [cf7-link-field recordset="activites_enfant_8-11" field="lbl_activite_enfant_8-11_2" value="{template.activite}" condition="record['id'] == 2"] [cf7-link-field recordset="horaires_enfant_8-11" field="chk_activite_enfant_8-11_2" value="" text="{template.horaire}" condition="record['id'] == 2"] [cf7-link-field recordset="activites_enfant_8-11" field="lbl_activite_enfant_8-11_3" value="{template.activite}" condition="record['id'] == 3"] [cf7-link-field recordset="horaires_enfant_8-11" field="chk_activite_enfant_8-11_3" value="" text="{template.horaire}" condition="record['id'] == 3"] [cf7-link-field recordset="activites_enfant_8-11" field="lbl_activite_enfant_8-11_4" value="{template.activite}" condition="record['id'] == 4"] [cf7-link-field recordset="horaires_enfant_8-11" field="chk_activite_enfant_8-11_4" value="" text="{template.horaire}" condition="record['id'] == 4"] [cf7-link-field recordset="activites_enfant_8-11" field="lbl_activite_enfant_8-11_5" value="{template.activite}" condition="record['id'] == 5"] [cf7-link-field recordset="horaires_enfant_8-11" field="chk_activite_enfant_8-11_5" value="" text="{template.horaire}" condition="record['id'] == 5"] [hidden nb_activites_enfant_10-15] [cf7-recordset id="nb_activites_enfant_10-15" type="database" query="SELECT COUNT(DISTINCT(activite)) as 'nb_activites_enfant_10-15' FROM mf_activites_liste_2023_2024 WHERE age_min = 10 AND age_max = 15;"] [cf7-link-field recordset="nb_activites_enfant_10-15" field="nb_activites_enfant_10-15" value="nb_activites_enfant_10-15"] [cf7-recordset id="activites_enfant_10-15" type="database" query="SELECT @row_number:=CASE WHEN @activite_id != activite OR @row_number = 0 THEN @row_number + 1 ELSE @row_number END AS id, @activite_id:=activite Activite, tarif FROM mf_activites_liste_2023_2024, (SELECT @activite_id:=0,@row_number:=0) as t WHERE age_min = 10 AND age_max = 15 GROUP BY activite ORDER BY activite;"] [cf7-recordset id="horaires_enfant_10-15" type="database" query="SELECT @row_number:=CASE WHEN @activite_id != activite OR @row_number = 0 THEN @row_number + 1 ELSE @row_number END AS id, CASE WHEN horaire LIKE 'Lundi%' THEN 1 WHEN horaire LIKE 'Mardi%' THEN 2 WHEN horaire LIKE 'Mercredi%' THEN 3 WHEN horaire LIKE 'Jeudi%' THEN 4 WHEN horaire LIKE 'Vendredi%' THEN 5 WHEN horaire LIKE 'Samedi%' THEN 6 WHEN horaire LIKE 'Dimanche%' THEN 7 END as jour_semaine, @activite_id:=activite Activite, horaire, tarif, age_min, age_max, autorisation_parentale, nb_places, intervenant FROM mf_activites_liste_2023_2024, (SELECT @activite_id:=0,@row_number:=0) as t WHERE age_min = 10 AND age_max = 15 ORDER BY activite, jour_semaine;"] [cf7-link-field recordset="activites_enfant_10-15" field="lbl_activite_enfant_10-15_1" value="{template.activite}" condition="record['id'] == 1"] [cf7-link-field recordset="horaires_enfant_10-15" field="chk_activite_enfant_10-15_1" value="" text="{template.horaire}" condition="record['id'] == 1"] [cf7-link-field recordset="activites_enfant_10-15" field="lbl_activite_enfant_10-15_2" value="{template.activite}" condition="record['id'] == 2"] [cf7-link-field recordset="horaires_enfant_10-15" field="chk_activite_enfant_10-15_2" value="" text="{template.horaire}" condition="record['id'] == 2"] [cf7-link-field recordset="activites_enfant_10-15" field="lbl_activite_enfant_10-15_3" value="{template.activite}" condition="record['id'] == 3"] [cf7-link-field recordset="horaires_enfant_10-15" field="chk_activite_enfant_10-15_3" value="" text="{template.horaire}" condition="record['id'] == 3"] [cf7-link-field recordset="activites_enfant_10-15" field="lbl_activite_enfant_10-15_4" value="{template.activite}" condition="record['id'] == 4"] [cf7-link-field recordset="horaires_enfant_10-15" field="chk_activite_enfant_10-15_4" value="" text="{template.horaire}" condition="record['id'] == 4"] [cf7-link-field recordset="activites_enfant_10-15" field="lbl_activite_enfant_10-15_5" value="{template.activite}" condition="record['id'] == 5"] [cf7-link-field recordset="horaires_enfant_10-15" field="chk_activite_enfant_10-15_5" value="" text="{template.horaire}" condition="record['id'] == 5"] [hidden nb_activites_enfant_15-19] [cf7-recordset id="nb_activites_enfant_15-19" type="database" query="SELECT COUNT(DISTINCT(activite)) as 'nb_activites_enfant_15-19' FROM mf_activites_liste_2023_2024 WHERE age_min = 15 AND age_max = 19;"] [cf7-link-field recordset="nb_activites_enfant_15-19" field="nb_activites_enfant_15-19" value="nb_activites_enfant_15-19"] [cf7-recordset id="activites_enfant_15-19" type="database" query="SELECT @row_number:=CASE WHEN @activite_id != activite OR @row_number = 0 THEN @row_number + 1 ELSE @row_number END AS id, @activite_id:=activite Activite, tarif FROM mf_activites_liste_2023_2024, (SELECT @activite_id:=0,@row_number:=0) as t WHERE age_min = 15 AND age_max = 19 GROUP BY activite ORDER BY activite;"] [cf7-recordset id="horaires_enfant_15-19" type="database" query="SELECT @row_number:=CASE WHEN @activite_id != activite OR @row_number = 0 THEN @row_number + 1 ELSE @row_number END AS id, CASE WHEN horaire LIKE 'Lundi%' THEN 1 WHEN horaire LIKE 'Mardi%' THEN 2 WHEN horaire LIKE 'Mercredi%' THEN 3 WHEN horaire LIKE 'Jeudi%' THEN 4 WHEN horaire LIKE 'Vendredi%' THEN 5 WHEN horaire LIKE 'Samedi%' THEN 6 WHEN horaire LIKE 'Dimanche%' THEN 7 END as jour_semaine, @activite_id:=activite Activite, horaire, tarif, age_min, age_max, autorisation_parentale, nb_places, intervenant FROM mf_activites_liste_2023_2024, (SELECT @activite_id:=0,@row_number:=0) as t WHERE age_min = 15 AND age_max = 19 ORDER BY activite, jour_semaine;"] [cf7-link-field recordset="activites_enfant_15-19" field="lbl_activite_enfant_15-19_1" value="{template.activite}" condition="record['id'] == 1"] [cf7-link-field recordset="horaires_enfant_15-19" field="chk_activite_enfant_15-19_1" value="" text="{template.horaire}" condition="record['id'] == 1"] [cf7-link-field recordset="activites_enfant_15-19" field="lbl_activite_enfant_15-19_2" value="{template.activite}" condition="record['id'] == 2"] [cf7-link-field recordset="horaires_enfant_15-19" field="chk_activite_enfant_15-19_2" value="" text="{template.horaire}" condition="record['id'] == 2"] [cf7-link-field recordset="activites_enfant_15-19" field="lbl_activite_enfant_15-19_3" value="{template.activite}" condition="record['id'] == 3"] [cf7-link-field recordset="horaires_enfant_15-19" field="chk_activite_enfant_15-19_3" value="" text="{template.horaire}" condition="record['id'] == 3"] [cf7-link-field recordset="activites_enfant_15-19" field="lbl_activite_enfant_15-19_4" value="{template.activite}" condition="record['id'] == 4"] [cf7-link-field recordset="horaires_enfant_15-19" field="chk_activite_enfant_15-19_4" value="" text="{template.horaire}" condition="record['id'] == 4"] [cf7-link-field recordset="activites_enfant_15-19" field="lbl_activite_enfant_15-19_5" value="{template.activite}" condition="record['id'] == 5"] [cf7-link-field recordset="horaires_enfant_15-19" field="chk_activite_enfant_15-19_5" value="" text="{template.horaire}" condition="record['id'] == 5"] [hidden total_activite2 id:total_activite2] [hidden total2 id:total2] 0 activité sélectionnée pour un montant total de 0 €
Hello, the loading of my page takes very long time since I use Conditional fields. I didn’t find a solution to make it more simple. Could you help me please, maybe there is a more elegant solution than this complex and redundant script ?
Thanks in advance for your help,
JF
The page I need help with: [log in to see the link]
- The topic ‘Load very long (25 sec) since I use Conditional fields’ is closed to new replies.